Mercurial > epgrec.yaz
changeset 163:b3095425e613
fix: Ï¿²èÃæ¤ËEPG¤ÎÊѹ¹¤¬¤¢¤Ã¤¿¤È¤¤Ë¥¥ã¥ó¥»¥ë¤µ¤ì¤Ê¤¤¤è¤¦Êѹ¹
author | [email protected] <[email protected]> |
---|---|
date | Sun, 04 Apr 2010 22:49:13 +0900 |
parents | c6c6bd734f18 |
children | 254d8a21bf36 |
files | recorder.php storeProgram.inc.php |
diffstat | 2 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/recorder.php Sun Apr 04 18:14:47 2010 +0900 +++ b/recorder.php Sun Apr 04 22:49:13 2010 +0900 @@ -156,6 +156,7 @@ $proch = false; if( ( $proch = epgrec_exec(DO_RECORD) ) !== false ) { + reclog("recorder:: é²ç»ID".$rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."ã®é²ç»éå§" ); // é²ç»å®äºå¾ ã¡ $rec_cont = true; while( $rec_cont ){ @@ -195,7 +196,6 @@ } // äºå®ããçããããªãçµäºæéãç¾å¨ã«æ¸ãæãã - if( time() < $endtime ) { $rrec->endtime = toDatetime( time() ); }
--- a/storeProgram.inc.php Sun Apr 04 18:14:47 2010 +0900 +++ b/storeProgram.inc.php Sun Apr 04 22:49:13 2010 +0900 @@ -1,4 +1,5 @@ <?php +include_once( INSTALL_PATH . "/reclib.php" ); function garbageClean() { // ä¸è¦ãªããã°ã©ã ã®åé¤ @@ -25,7 +26,6 @@ foreach( $arr as $val ) { try { $val->reservation(); -// reclog( "getepg::ãã¼ã¯ã¼ãID".$val->id."ã®é²ç»ãäºç´ããã"); } catch( Exception $e ) { // ç¡è¦ @@ -35,6 +35,7 @@ function storeProgram( $type, $xmlfile ) { global $BS_CHANNEL_MAP, $GR_CHANNEL_MAP, $CS_CHANNEL_MAP; + global $settings; // ãã£ã³ãã«ããããã¡ã¤ã«ã®æºå $map = array(); @@ -149,9 +150,15 @@ // èªåé²ç»äºç´ãããçªçµã¯æ¾æ æéå¤æ´ã¨åæã«ãã£ããåé¤ãã try { $reserve = new DBRecord(RESERVE_TBL, "program_id", $rec->id ); - if( $reserve->autorec ) { - reclog( "getepg::é²ç»ID".$reserve->id.":".$reserve->type.$reserve->channel.$reserve->title."ã¯æéå¤æ´ã®å¯è½æ§ãããäºç´åãæ¶ã" ); - Reservation::cancel( $reserve->id ); + // ãã§ã«éå§ããã¦ããé²ç»ã¯ç¡è¦ãã + if( time() > (toTimestamp($reserve->starttime) - PADDING_TIME - $settings->former_time) ) { + reclog( "getepg::é²ç»ID".$reserve->id.":".$reserve->type.$reserve->channel.$reserve->title."ã¯é²ç»éå§å¾ã«æéå¤æ´ãçºçããå¯è½æ§ããã", EPGREC_WARN ); + } + else { + if( $reserve->autorec ) { + reclog( "getepg::é²ç»ID".$reserve->id.":".$reserve->type.$reserve->channel.$reserve->title."ã¯æéå¤æ´ã®å¯è½æ§ãããäºç´åãæ¶ã" ); + Reservation::cancel( $reserve->id ); + } } } catch( Exception $e ) {