public function getType()
 {
     return QuickPlayDistributionPlugin::getDistributionProviderTypeCoreValue(QuickPlayDistributionProviderType::QUICKPLAY);
 }
 public function getProvider()
 {
     return QuickPlayDistributionPlugin::getProvider();
 }
예제 #3
0
            KalturaLog::debug("Hulu Distribution profile [{$huluDistributionProfileId}] file [{$path}/{$element}] size check failed: " . $e->getMessage());
            $passed = false;
        }
        if (!$passed) {
            break;
        }
    }
    if ($passed) {
        KalturaLog::notice("Hulu Distribution profile [{$huluDistributionProfileId}] passed");
    } else {
        KalturaLog::err("Hulu Distribution profile [{$huluDistributionProfileId}] failed");
    }
}
$distributionProfileCriteria = new Criteria();
$distributionProfileCriteria->add(DistributionProfilePeer::STATUS, DistributionProfileStatus::ENABLED);
$distributionProfileCriteria->add(DistributionProfilePeer::PROVIDER_TYPE, QuickPlayDistributionPlugin::getDistributionProviderTypeCoreValue(QuickPlayDistributionProviderType::QUICKPLAY));
$quickPlayDistributionProfiles = DistributionProfilePeer::doSelect($distributionProfileCriteria);
KalturaLog::debug("Quick Play Distribution profiles count [" . count($quickPlayDistributionProfiles) . "]");
foreach ($quickPlayDistributionProfiles as $quickPlayDistributionProfile) {
    /* @var $quickPlayDistributionProfile QuickPlayDistributionProfile */
    $quickPlayDistributionProfileId = $quickPlayDistributionProfile->getId();
    $passed = true;
    $sftp = kFileTransferMgr::getInstance(kFileTransferMgrType::SFTP_SEC_LIB);
    /* @var $sftp sftpSecLibMgr */
    try {
        $sftp->login($quickPlayDistributionProfile->getSftpHost(), $quickPlayDistributionProfile->getSftpLogin(), $quickPlayDistributionProfile->getSftpPass());
    } catch (Exception $e) {
        KalturaLog::err("Quick Play Distribution profile [{$quickPlayDistributionProfileId}] login failed: " . $e->getMessage());
        continue;
    }
    $path = $quickPlayDistributionProfile->getSftpBasePath();