Mercurial > epgrec.yaz
changeset 90:057ca53de6ca
fix tuner occupation check
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 02 Mar 2010 23:05:53 +0900 |
parents | 663521c2bf06 |
children | e2c37cc736db |
files | getepg.php |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/getepg.php Tue Mar 02 23:00:04 2010 +0900 +++ b/getepg.php Tue Mar 02 23:05:53 2010 +0900 @@ -38,8 +38,7 @@ if( $settings->bs_tuners != 0 ) { // 録画重複チェック $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); - if( $num < $settings->bs_tuners ) { //xxx -// if( ($num == 0) && check_file($temp_xml_bs) ) { //orig + if($num < $settings->bs_tuners && check_file($temp_xml_bs)) { $cmdline = "CHANNEL=".BS_EPG_CHANNEL." DURATION=180 TYPE=BS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; exec( $cmdline ); $cmdline = $settings->epgdump." /BS ".$settings->temp_data." ".$temp_xml_bs; @@ -52,7 +51,8 @@ // CS if ($settings->cs_rec_flg != 0) { $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); - if( ($num == 0) && check_file($temp_xml_cs1) ) { + if($num < $settings->bs_tuners && check_file($temp_xml_cs1)) { + $cmdline = "CHANNEL=".CS1_EPG_CHANNEL." DURATION=120 TYPE=CS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; exec( $cmdline ); $cmdline = $settings->epgdump." /CS ".$settings->temp_data." ".$temp_xml_cs1; @@ -79,8 +79,7 @@ foreach( $GR_CHANNEL_MAP as $key=>$value ){ // 録画重複チェック $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND type = 'GR' AND endtime > now() AND starttime < addtime( now(), '00:01:10')" ); - if( $num < $settings->gr_tuners ) { //xxx -// if( ($num == 0) && check_file($temp_xml_gr.$value."") ) { + if($num < $settings->gr_tuners && check_file($temp_xml_gr.$value."")) { $cmdline = "CHANNEL=".$value." DURATION=60 TYPE=GR TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; exec( $cmdline ); $cmdline = $settings->epgdump." ".$key." ".$settings->temp_data." ".$temp_xml_gr.$value."";