# HG changeset patch # User Sushi-k # Date 1266922710 -32400 # Node ID 69e0dabc765ac2f244d21738664eeb858797000d # Parent 1363ac0561978597e5c25e890a38c9c15074bd43 fixed: Reservation.class.php modified: config.php.sample modified: index.php modified: install/step1.php modified: install/step3.php install/grscan.php diff -r 1363ac056197 -r 69e0dabc765a Reservation.class.php --- a/Reservation.class.php Tue Nov 03 16:01:24 2009 +0900 +++ b/Reservation.class.php Tue Feb 23 19:58:30 2010 +0900 @@ -231,10 +231,10 @@ $filename = str_replace("%DURATION%","".$duration, $filename ); // 文字コード変換 - if( defined("FIESYSTEM_ENCODING") ) { + if( defined("FILESYSTEM_ENCODING") ) { $filename = mb_convert_encoding( $filename, FILESYSTEM_ENCODING, "UTF-8" ); } - $filename .= $RECORD_MODE[$mode]['suffix']; + $filename .= $RECORD_MODE["$mode"]['suffix']; $thumbname = $filename.".jpg"; // サムネール diff -r 1363ac056197 -r 69e0dabc765a config.php.sample --- a/config.php.sample Tue Nov 03 16:01:24 2009 +0900 +++ b/config.php.sample Tue Feb 23 19:58:30 2010 +0900 @@ -1,5 +1,8 @@ チャンネル番号 $GR_CHANNEL_MAP = array( @@ -54,7 +57,7 @@ */ ); -// USE_KUROBON以外の定数は設定不要になりました +// 以下、USE_KUROBON以外の定数は設定不要になりました define( "INSTALL_PATH", dirname(__FILE__) ); // インストールパス define( "USE_KUROBON", false ); // BSチューナーとしてFriio BS/CSを使うならtrue @@ -66,6 +69,15 @@ define( "COMPLETE_CMD", INSTALL_PATH . "/recomplete.php" ); // 録画終了コマンド define( "GEN_THUMBNAIL", INSTALL_PATH . "/gen-thumbnail.sh" ); // サムネール生成スクリプト + +// 地上デジタルチャンネルテーブルsettings/gr_channel.phpが存在するならそれを +// 優先する +if( file_exists( INSTALL_PATH."/settings/gr_channel.php" ) ) { + unset($GR_CHANNEL_MAP); + include_once( INSTALL_PATH."/settings/gr_channel.php" ); +} + + // 全国用BSデジタルチャンネルマップ $BS_CHANNEL_MAP = array( "3001.ontvjapan.com" => "101", @@ -198,64 +210,66 @@ // 予約テーブル define( "RESERVE_STRUCT", "id integer not null auto_increment primary key,". // ID - "channel_disc varchar(128) default 'none',". // channel disc - "channel_id integer default '0',". // channel ID - "program_id integer default '0',". // Program ID - "type varchar(8) default 'GR',". // 種別(GR/BS/CS) - "channel varchar(10) default '0',". // チャンネル - "title varchar(512) default 'none',". // タイトル - "description text default null,". // 説明 - "category_id integer default '0',". // カテゴリID - "starttime datetime default '1970-01-01 00:00:00',". // 開始時刻 - "endtime datetime default '1970-01-01 00:00:00',". // 終了時刻 - "job integer default '0',". // job番号 + "channel_disc varchar(128) not null default 'none',". // channel disc + "channel_id integer not null default '0',". // channel ID + "program_id integer not null default '0',". // Program ID + "type varchar(8) not null default 'GR',". // 種別(GR/BS/CS) + "channel varchar(10) not null default '0',". // チャンネル + "title varchar(512) not null default 'none',". // タイトル + "description varchar(512) not null default ' ',". // 説明 text->varchar + "category_id integer not null default '0',". // カテゴリID + "starttime datetime not null default '1970-01-01 00:00:00',". // 開始時刻 + "endtime datetime not null default '1970-01-01 00:00:00',". // 終了時刻 + "job integer not null default '0',". // job番号 "path blob default null,". // 録画ファイルパス - "complete boolean default '0',". // 完了フラグ - "reserve_disc varchar(128) default 'none',". // 識別用hash - "autorec integer default '0',". // キーワードID - "mode integer default '0'" //録画モード + "complete boolean not null default '0',". // 完了フラグ + "reserve_disc varchar(128) not null default 'none',". // 識別用hash + "autorec integer not null default '0',". // キーワードID + "mode integer not null default '0'" //録画モード ); // 番組表テーブル define( "PROGRAM_STRUCT", "id integer not null auto_increment primary key,". // ID - "channel_disc varchar(128) default 'none',". // channel disc - "channel_id integer default '0',". // channel ID - "type varchar(8) default 'GR',". // 種別(GR/BS/CS) - "channel varchar(10) default '0',". // チャンネル - "title varchar(512) default 'none',". // タイトル - "description text default null,". // 説明 - "category_id integer default '0',". // カテゴリID - "starttime datetime default '1970-01-01 00:00:00',". // 開始時刻 - "endtime datetime default '1970-01-01 00:00:00',". // 終了時刻 - "program_disc char(128) default 'none',". // 識別用hash - "autorec boolean default '1'" // 自動録画有効無効 + "channel_disc varchar(128) not null default 'none',". // channel disc + "channel_id integer not null default '0',". // channel ID + "type varchar(8) not null default 'GR',". // 種別(GR/BS/CS) + "channel varchar(10) not null default '0',". // チャンネル + "title varchar(512) not null default 'none',". // タイトル + "description varchar(512) not null default 'none',". // 説明 text->varchar + "category_id integer not null default '0',". // カテゴリID + "starttime datetime not null default '1970-01-01 00:00:00',". // 開始時刻 + "endtime datetime not null default '1970-01-01 00:00:00',". // 終了時刻 + "program_disc varchar(128) not null default 'none',". // 識別用hash + "autorec boolean not null default '1'" // 自動録画有効無効 ); define( "CHANNEL_STRUCT", "id integer not null auto_increment primary key,". // ID - "type varchar(8) default 'GR',". // 種別 - "channel varchar(10) default '0',". // channel - "name varchar(512) default 'none',". // 表示名 - "channel_disc varchar(128) default 'none'" // 識別用hash + "type varchar(8) not null default 'GR',". // 種別 + "channel varchar(10) not null default '0',". // channel + "name varchar(512) not null default 'none',". // 表示名 + "channel_disc varchar(128) not null default 'none',". // 識別用hash + "sid varchar(64) not null default 'hd'" // サービスID用02/23/2010追加 ); define( "CATEGORY_STRUCT", "id integer not null auto_increment primary key,". // ID - "name_jp varchar(512) default 'none',". // 表示名 - "name_en varchar(512) default 'none',". // 同上 - "category_disc varchar(128) default 'none'" // 識別用hash + "name_jp varchar(512) not null default 'none',". // 表示名 + "name_en varchar(512) not null default 'none',". // 同上 + "category_disc varchar(128) not null default 'none'" // 識別用hash ); define( "KEYWORD_STRUCT", "id integer not null auto_increment primary key,". // ID - "keyword varchar(512) default '*',". // 表示名 - "type varchar(8) default '*',". // 種別 - "channel_id integer default '0',". // channel ID - "category_id integer default '0',". // カテゴリID - "use_regexp boolean default '0'" // 正規表現を使用するなら1 + "keyword varchar(512) not null default '*',". // 表示名 + "type varchar(8) not null default '*',". // 種別 + "channel_id integer not null default '0',". // channel ID + "category_id integer not null default '0',". // カテゴリID + "use_regexp boolean not null default '0',". // 正規表現を使用するなら1 + "autorec_mode integer not null defult '0'" // 自動録画のモード02/23/2010追加 ); -?> +?> \ No newline at end of file diff -r 1363ac056197 -r 69e0dabc765a index.php --- a/index.php Tue Nov 03 16:01:24 2009 +0900 +++ b/index.php Tue Feb 23 19:58:30 2010 +0900 @@ -49,7 +49,13 @@ else if( $type == "GR" ) $channel_map = $GR_CHANNEL_MAP; else if( $type == "CS" ) $channel_map = $CS_CHANNEL_MAP; $st = 0; - $prec = new DBRecord(PROGRAM_TBL); + $prec = null; + try { + $prec = new DBRecord(PROGRAM_TBL); + } + catch( Exception $e ) { + exit('プログラムテーブルが存在しないようです。インストールをやり直してください.'); + } foreach( $channel_map as $channel_disc => $channel ) { $prev_end = $top_time; try { @@ -104,7 +110,8 @@ } } catch( exception $e ) { - exit( $e->getMessage() ); +// exit( $e->getMessage() ); +// 何もしない } // 空きを埋める if( ($last_time - $prev_end) > 0 ) { @@ -221,4 +228,4 @@ $smarty->display("index.html"); -?> \ No newline at end of file +?> diff -r 1363ac056197 -r 69e0dabc765a install/step1.php --- a/install/step1.php Tue Nov 03 16:01:24 2009 +0900 +++ b/install/step1.php Tue Feb 23 19:58:30 2010 +0900 @@ -77,6 +77,10 @@ } echo ""; +if( !file_exists( "/usr/local/bin/grscan" ) ) { + +include_once( INSTALL_PATH."/settings/gr_channel.php" ); + echo "

地上デジタルチャンネルの設定確認

"; echo "
現在、config.phpでは以下のチャンネルの受信が設定されています。受信不可能なチャンネルが混ざっていると番組表が表示できません。
"; @@ -87,7 +91,18 @@ } echo ""; - echo '

以上を確認し次の設定に進む

'; +} +else { + +echo'

地上デジタルチャンネルの設定

'; +echo ' +

+
地上デジタルチャンネルスキャンを開始します。スキャンにはおよそ10~20分程度はかかります。ケーブルテレビをお使いの方は下のチェックボックスをオンにしてください
+
ケーブルテレビを使用:
+ + +
'; +} ?> diff -r 1363ac056197 -r 69e0dabc765a install/step3.php --- a/install/step3.php Tue Nov 03 16:01:24 2009 +0900 +++ b/install/step3.php Tue Feb 23 19:58:30 2010 +0900 @@ -51,6 +51,7 @@ $smarty->compile_dir = "../templates_c/"; $smarty->cache_dir = "../cache/"; +$smarty->assign( "record_mode", $RECORD_MODE ); $smarty->assign( "settings", $settings ); $smarty->assign( "install_path", INSTALL_PATH ); $smarty->assign( "post_to", "step4.php" );