Mercurial > epgrec.yaz
comparison getepg.php @ 151:43f74519bd52
more relaxed tuner occupation check
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 28 Mar 2010 21:09:16 +0900 |
parents | 4afd353b4507 |
children | 190a3c46611d |
comparison
equal
deleted
inserted
replaced
150:3a6ec345ab0c | 151:43f74519bd52 |
---|---|
85 if( file_exists( $temp_xml_cs1 ) ) @unlink( $temp_xml_cs1 ); | 85 if( file_exists( $temp_xml_cs1 ) ) @unlink( $temp_xml_cs1 ); |
86 } | 86 } |
87 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); | 87 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); |
88 } | 88 } |
89 $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); | 89 $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); |
90 if( ($num == 0) && check_file($temp_xml_cs2) ) { | 90 if( ($num < $settings->bs_tuners) && check_file($temp_xml_cs2) ) { |
91 $cmdline = "CHANNEL=".CS2_EPG_CHANNEL." DURATION=120 TYPE=CS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; | 91 $cmdline = "CHANNEL=".CS2_EPG_CHANNEL." DURATION=120 TYPE=CS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; |
92 exec( $cmdline ); | 92 exec( $cmdline ); |
93 $cmdline = $settings->epgdump." /CS ".$settings->temp_data." ".$temp_xml_cs2; | 93 $cmdline = $settings->epgdump." /CS ".$settings->temp_data." ".$temp_xml_cs2; |
94 exec( $cmdline ); | 94 exec( $cmdline ); |
95 if( $use_para ) { | 95 if( $use_para ) { |