From 2603a8d6e1e3a589f627f4a792adaa14332455bb Mon Sep 17 00:00:00 2001 From: yoneda Date: Tue, 3 Nov 2009 14:51:44 +0900 Subject: [PATCH] testing: auto record with mode --- Keyword.class.php | 2 +- Settings.class.php | 19 +++++++++++++++++-- envSetting.php | 1 + templates/envSetting.html | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Keyword.class.php b/Keyword.class.php index 362a524..16cd26a 100755 --- a/Keyword.class.php +++ b/Keyword.class.php @@ -72,7 +72,7 @@ class Keyword extends DBRecord { foreach( $precs as $rec ) { try { if( $rec->autorec ) { - Reservation::simple( $rec->id, $this->id ); + Reservation::simple( $rec->id, $this->id, $this->settings->autorec_mode ); usleep( 100 ); // あんまり時間を空けないのもどう? } } diff --git a/Settings.class.php b/Settings.class.php index 2eb00df..c531837 100755 --- a/Settings.class.php +++ b/Settings.class.php @@ -9,7 +9,17 @@ class Settings extends SimpleXMLElement { if( file_exists( INSTALL_PATH . self::CONFIG_XML ) ) { $xmlfile = file_get_contents(INSTALL_PATH . self::CONFIG_XML); - return new self($xmlfile); + $obj = new self($xmlfile); + + // 8月14日以降に追加した設定項目の自動生成 + + // キーワード自動録画の録画モード + if( $obj->exists("autorec_mode") == 0 ) { + $obj->autorec_mode = 0; + $obj->save(); + } + + return $obj; } else { // 初回起動 @@ -100,6 +110,11 @@ class Settings extends SimpleXMLElement { // 1分あたりの高さ $xml->height_per_hour = 120; + // 8月14日版以降に追加した設定項目 + + // キーワード自動録画の録画モード + $xml->autorec_mode = 0; + $xml->save(); return $xml; @@ -125,4 +140,4 @@ class Settings extends SimpleXMLElement { $this->asXML(INSTALL_PATH . self::CONFIG_XML); } } -?> +?> \ No newline at end of file diff --git a/envSetting.php b/envSetting.php index c0fe753..f73e0a1 100755 --- a/envSetting.php +++ b/envSetting.php @@ -7,6 +7,7 @@ $settings = Settings::factory(); $smarty = new Smarty(); $smarty->assign( "settings", $settings ); +$smarty->assign( "record_mode", $RECORD_MODE ); $smarty->assign( "install_path", INSTALL_PATH ); $smarty->assign( "post_to", "postsettings.php" ); $smarty->assign( "sitetitle", "環境設定設定" ); diff --git a/templates/envSetting.html b/templates/envSetting.html index de06aaf..3061e5a 100755 --- a/templates/envSetting.html +++ b/templates/envSetting.html @@ -105,6 +105,20 @@ div.setting { padding: 0px; margin-left: 20px; margin-bottom: 20px;} + +

キーワード自動録画の録画モード

+
+
キーワード自動録画を行う番組の録画モードを設定します。config.phpの$RECORD_MODEに複数の録画モードを登録しているのであれば、この設定でキーワード自動録画の録画モードを変更できます。デフォルトはモード0です。 +
+ +
+ + +

mediatomb連係機能

この設定を「使う」にすると録画した番組のタイトルと概要をmediatombに反映させます。mediatombを使用していない方は「使わない」に設定してください。なお、この設定を利用するにはmediatomb側の設定も必要になります。詳しくはドキュメントを参照してください。 -- 2.11.0