チェンジセット 83: trunk/install/perl/addpidatq.pl
- コミット日時:
- 2008/12/30 22:12:46 (16 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/perl/addpidatq.pl
r1 r83 47 47 if ($titlecount[0] == 1 ){ 48 48 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' "; 50 50 $sth = $dbh->prepare($DBQuery); 51 51 $sth->execute(); 52 52 @titlecount= $sth->fetchrow_array; 53 53 $bitrate = $titlecount[0];#ビットレート取得 54 if ($titlecount[1] >= 1){ 55 $usedigital = $titlecount[1];#デジタル優先フラグ 56 }else{ 57 $usedigital = 0; 58 } 54 59 55 60 #PID抽出 56 61 $now = &epoch2foldate(`date +%s`); 57 62 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 "; 59 65 60 61 #stationIDからrecch62 66 $stationh = $dbh->prepare($DBQuery); 63 67 $stationh->execute(); 64 68 @stationl = $stationh->fetchrow_array; 65 69 $recch = $stationl[0]; 66 70 if ($recch eq ""){ 71 &writelog("addpidatq ERROR recch is NULL:$DBQuery."); 72 exit 1; 73 } 74 if ($stationl[1] => 1){ 75 $digitalch = $stationl[1]; 76 }else{ 77 $digitalch = 0; 78 } 79 if ($stationl[2] => 1){ 80 $digitalstationband = $stationl[2]; 81 }else{ 82 $digitalstationband = 0; 83 } 67 84 $DBQuery = "SELECT * FROM foltia_subtitle WHERE pid='$pid' "; 68 85 $sth = $dbh->prepare($DBQuery); … … 109 126 } 110 127 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");128 Schedule::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"); 113 130 114 131 }#end #もし新開始時刻が15分移譲先なら再キュー 115 132 116 133 }else{ 117 &writelog("addpidatq drop:expire $pid $startafter $now$startdatetime");134 &writelog("addpidatq drop:expire $pid $startafter $now $startdatetime"); 118 135 }#放送が未来の日付なら 119 136