Mercurial > epgrec.yaz
diff storeProgram.inc.php @ 125:ef3df87f3c7d
mod: チャンネルスキップの大まかな実装終了
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Wed, 17 Mar 2010 18:12:01 +0900 |
parents | 3bed74eca373 |
children | 9c5e597ef6c6 |
line wrap: on
line diff
--- a/storeProgram.inc.php Wed Mar 17 01:34:26 2010 +0900 +++ b/storeProgram.inc.php Wed Mar 17 18:12:01 2010 +0900 @@ -29,6 +29,7 @@ function storeProgram( $type, $xmlfile ) { global $BS_CHANNEL_MAP, $GR_CHANNEL_MAP, $CS_CHANNEL_MAP; + // c潟<ゃ羣 $map = array(); if( $type == "BS" ) $map = $BS_CHANNEL_MAP; @@ -71,10 +72,21 @@ // programme 緇 foreach( $xml->programme as $program ) { + $channel_rec = null; + $channel_disc = $program['channel']; if( ! array_key_exists( "$channel_disc", $map ) ) continue; + $channel = $map["$channel_disc"]; - $channel = $map["$channel_disc"]; + try { + $channel_rec = new DBRecord(CHANNEL_TBL, "channel_disc", "$channel_disc" ); + } + catch( Exception $e ) { + // ∴ + } + if( $channel_rec == null ) continue; // 緇莎激 + if( $channel_rec->skip == 1 ) continue; // 篆<c潟 + $starttime = str_replace(" +0900", '', $program['start'] ); $endtime = str_replace( " +0900", '', $program['stop'] ); $title = $program->title; @@ -101,8 +113,7 @@ } else $cat_rec = new DBRecord(CATEGORY_TBL, "category_disc" , $category_disc ); - // - $channel_rec = new DBRecord(CHANNEL_TBL, "channel_disc", $channel_disc ); + // $num = DBRecord::countRecords(PROGRAM_TBL, "WHERE program_disc = '".$program_disc."'" ); if( $num == 0 ) { // 域腟