Esempio n. 1
0
    $still_found = sotf_VideoFile::searchForStill($prg);
    if (!$still_found && $createstills) {
        sotf_VideoFile::createStills($files[0]->path, $files[0]->duration, $id);
    }
}
if ($missing) {
    // there was a missing file description, so we have to restart the whole process
    $page->redirectSelf();
    exit;
}
$checker =& new sotf_ContentCheck($prgAudiolist);
//todo $prgAudioList MEANT CONTENT
$checker = $checker->selectType();
//check for recently converted files or transcoding in progress
if ($video && $prgAudiolist->count()) {
    $list_changed = sotf_VideoFile::processTranscodingQueue($repository, $prg, $checker);
    if ($list_changed) {
        $page->redirectSelf();
        exit;
    }
}
// compare with required formats
$PRG_AUDIO = array();
for ($i = 0; $i < count($config[$checker->prefix . 'Formats']); $i++) {
    $PRG_AUDIO[$i] = array("format" => $checker->getFormatFileName($i), "index" => $i, "flv" => preg_match("/flv/", $checker->getFormatFileName($i)));
    if ($checker->reqs[$i][0]) {
        $fname = $prgAudiolist->list[$checker->reqs[$i][1]]->name;
        $PRG_AUDIO[$i] = array_merge($PRG_AUDIO[$i], $mainAudio[$fname]);
        //$PRG_AUDIO[$i]['name'] = $fname;
        unset($mainAudio[$fname]);
    } else {
Esempio n. 2
0
 if ($series) {
     $smarty->assign('SERIES_DATA', $series->getAllWithIcon());
 }
 // roles and contacts
 $smarty->assign('ROLES', $prg->getRoles());
 // genre
 $smarty->assign('GENRE', $vocabularies->getGenreName($prg->get('genre_id')));
 // topics
 //$smarty->assign('TOPICS', $prg->getTopics());	CP 201106: commented out because if active no topics are shown
 // language
 $smarty->assign('LANGUAGE', $prg->getLanguagesLocalized());
 // rights sections
 $smarty->assign('RIGHTS', $prg->getAssociatedObjects('sotf_rights', 'start_time'));
 //check for recently converted files or transcoding in progress
 if ($prg->isVideoPrg()) {
     sotf_VideoFile::processTranscodingQueue($repository, $prg);
 }
 // content files
 $mainContentFiles = $prg->getAssociatedObjects('sotf_media_files', 'main_content DESC, filename');
 $to = count($mainContentFiles);
 $flv_found = false;
 //ADDED BY Martin Schmidt
 for ($i = 0; $i < $to; $i++) {
     if ($prg->isLocal()) {
         // if local, we check if file disappeared in the meantime
         $path = $prg->getFilePath($mainContentFiles[$i]);
         if (!is_readable($path)) {
             debug("DISAPPEARED FILE", $path);
             unset($mainContentFiles[$i]);
             continue;
         }