Mercurial > epgrec.yaz
comparison Settings.class.php @ 66:3d6e7c606896
testing: auto record with mode
author | yoneda <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Tue, 03 Nov 2009 14:51:44 +0900 |
parents | 7a4050545d98 |
children | 1033324d7ecc |
comparison
equal
deleted
inserted
replaced
65:f8af9716f021 | 66:3d6e7c606896 |
---|---|
7 | 7 |
8 public static function factory() { | 8 public static function factory() { |
9 | 9 |
10 if( file_exists( INSTALL_PATH . self::CONFIG_XML ) ) { | 10 if( file_exists( INSTALL_PATH . self::CONFIG_XML ) ) { |
11 $xmlfile = file_get_contents(INSTALL_PATH . self::CONFIG_XML); | 11 $xmlfile = file_get_contents(INSTALL_PATH . self::CONFIG_XML); |
12 return new self($xmlfile); | 12 $obj = new self($xmlfile); |
13 | |
14 // 8月14日以降に追加した設定項目の自動生成 | |
15 | |
16 // キーワード自動録画の録画モード | |
17 if( $obj->exists("autorec_mode") == 0 ) { | |
18 $obj->autorec_mode = 0; | |
19 $obj->save(); | |
20 } | |
21 | |
22 return $obj; | |
13 } | 23 } |
14 else { | 24 else { |
15 // 初回起動 | 25 // 初回起動 |
16 $xmlfile = '<?xml version="1.0" encoding="UTF-8" ?><epgrec></epgrec>'; | 26 $xmlfile = '<?xml version="1.0" encoding="UTF-8" ?><epgrec></epgrec>'; |
17 $xml = new self($xmlfile); | 27 $xml = new self($xmlfile); |
98 // 1局の幅 | 108 // 1局の幅 |
99 $xml->ch_set_width = 150; | 109 $xml->ch_set_width = 150; |
100 // 1分あたりの高さ | 110 // 1分あたりの高さ |
101 $xml->height_per_hour = 120; | 111 $xml->height_per_hour = 120; |
102 | 112 |
113 // 8月14日版以降に追加した設定項目 | |
114 | |
115 // キーワード自動録画の録画モード | |
116 $xml->autorec_mode = 0; | |
117 | |
103 $xml->save(); | 118 $xml->save(); |
104 | 119 |
105 return $xml; | 120 return $xml; |
106 } | 121 } |
107 } | 122 } |