チェンジセット 83: trunk/install/perl/addpidatq.pl

差分発生行の前後
無視リスト:
コミット日時:
2008/12/30 22:12:46 (15 年前)
コミッタ:
sorshi
ログメッセージ:

foltiaHD最初のリリース。
デジタル録画はFriio/Friio BS/CSのみに対応。
ivtvは1.0系使用になりました。

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/install/perl/addpidatq.pl

    r1 r83  
    4747 if ($titlecount[0]  == 1 ){ 
    4848 
    49 $DBQuery =  "SELECT bitrate FROM  foltia_tvrecord , foltia_subtitle  WHERE foltia_tvrecord.tid = foltia_subtitle.tid AND pid='$pid' "; 
     49$DBQuery =  "SELECT bitrate,digital FROM  foltia_tvrecord , foltia_subtitle  WHERE foltia_tvrecord.tid = foltia_subtitle.tid AND pid='$pid' "; 
    5050 $sth = $dbh->prepare($DBQuery); 
    5151$sth->execute(); 
    5252 @titlecount= $sth->fetchrow_array; 
    5353$bitrate = $titlecount[0];#ビットレート取得 
     54if ($titlecount[1] >= 1){ 
     55        $usedigital = $titlecount[1];#デジタル優先フラグ 
     56}else{ 
     57        $usedigital = 0; 
     58} 
    5459 
    5560#PID抽出 
    5661$now = &epoch2foldate(`date +%s`); 
    5762 
    58 $DBQuery =  "SELECT stationrecch FROM foltia_station,foltia_subtitle WHERE foltia_subtitle.pid = '$pid'  AND  foltia_subtitle.stationid =  foltia_station.stationid "; 
     63#stationIDからrecch 
     64$DBQuery =  "SELECT stationrecch,digitalch ,digitalstationband ,foltia_station.stationid  FROM foltia_station,foltia_subtitle WHERE foltia_subtitle.pid = '$pid'  AND  foltia_subtitle.stationid =  foltia_station.stationid "; 
    5965 
    60  
    61 #stationIDからrecch 
    6266 $stationh = $dbh->prepare($DBQuery); 
    6367        $stationh->execute(); 
    6468@stationl =  $stationh->fetchrow_array; 
    6569$recch = $stationl[0]; 
    66  
     70if ($recch eq ""){ 
     71        &writelog("addpidatq ERROR recch is NULL:$DBQuery."); 
     72        exit 1; 
     73
     74if ($stationl[1] => 1){ 
     75        $digitalch = $stationl[1]; 
     76}else{ 
     77        $digitalch = 0; 
     78
     79if ($stationl[2] => 1){ 
     80        $digitalstationband = $stationl[2]; 
     81}else{ 
     82        $digitalstationband = 0; 
     83
    6784$DBQuery =  "SELECT  * FROM  foltia_subtitle WHERE pid='$pid' "; 
    6885 $sth = $dbh->prepare($DBQuery); 
     
    109126} 
    110127 
    111 Schedule::At::add (TIME => "$atdateparam", COMMAND => "$toolpath/perl/recwrap.pl $recch $reclength $bitrate $tid $countno $pid" , TAG => "$pid"."_R"); 
    112         &writelog("addpidatq TIME $atdateparam   COMMAND $toolpath/perl/recwrap.pl $recch $reclength $bitrate $tid $countno $pid"); 
     128Schedule::At::add (TIME => "$atdateparam", COMMAND => "$toolpath/perl/recwrap.pl $recch $reclength $bitrate $tid $countno $pid $stationid $usedigital $digitalstationband $digitalch" , TAG => "$pid"."_R"); 
     129        &writelog("addpidatq TIME $atdateparam   COMMAND $toolpath/perl/recwrap.pl $recch $reclength $bitrate $tid $countno $pid $stationid $usedigital $digitalstationband $digitalch"); 
    113130 
    114131}#end #もし新開始時刻が15分移譲先なら再キュー 
    115132 
    116133}else{ 
    117 &writelog("addpidatq drop:expire $pid  $startafter  $now $startdatetime"); 
     134&writelog("addpidatq drop:expire $pid $startafter $now $startdatetime"); 
    118135}#放送が未来の日付なら 
    119136 
track feed