Merge branch 'bug_618_fix_display_recording_indication'
authorghost <andreas.monzner@multimedia-labs.de>
Mon, 15 Nov 2010 18:20:05 +0000 (19:20 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Mon, 15 Nov 2010 18:20:05 +0000 (19:20 +0100)
data/defaults/Dream/Makefile.am
data/defaults/Dream/dm500hd.info
data/defaults/Dream/dm7020hd.info
data/defaults/Dream/dm7025.info
data/defaults/Dream/dm800.info
data/defaults/Dream/dm8000.info
data/defaults/Dream/dm800se.info
data/defaults/Dream/settings.c [new file with mode: 0644]
data/defaults/Dream/settings.t [new file with mode: 0644]
lib/python/Components/config.py

index 1758f67..ee66c93 100644 (file)
@@ -15,4 +15,6 @@ dist_install_DATA = \
        settings.7020hd \
        settings.7025 \
        settings.800 \
-       settings.8000
+       settings.8000 \
+       settings.c \
+       settings.t
index b1b4d53..9743c1f 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 3af4679..c0b8945 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index a1585cf..9201aa1 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="sdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="sdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 4793bd8..b91f7a7 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 2ef2013..ff60dd5 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 6974b12..2e11cdc 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
diff --git a/data/defaults/Dream/settings.c b/data/defaults/Dream/settings.c
new file mode 100644 (file)
index 0000000..72ab938
--- /dev/null
@@ -0,0 +1 @@
+config.tv.lastroot=1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 22) || (type == 25) || (type == 134) || (type == 195) ORDER BY name;
diff --git a/data/defaults/Dream/settings.t b/data/defaults/Dream/settings.t
new file mode 100644 (file)
index 0000000..72ab938
--- /dev/null
@@ -0,0 +1 @@
+config.tv.lastroot=1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 22) || (type == 25) || (type == 134) || (type == 195) ORDER BY name;
index d7506e3..44ad6d2 100755 (executable)
@@ -1624,16 +1624,17 @@ class Config(ConfigSubsection):
                self.pickle_this("config", self.saved_value, result)
                return ''.join(result)
 
-       def unpickle(self, lines):
+       def unpickle(self, lines, base_file=True):
                tree = { }
                for l in lines:
                        if not l or l[0] == '#':
                                continue
 
                        n = l.find('=')
+                       name = l[:n]
                        val = l[n+1:].strip()
 
-                       names = l[:n].split('.')
+                       names = name.split('.')
 #                      if val.find(' ') != -1:
 #                              val = val[:val.find(' ')]
 
@@ -1644,6 +1645,12 @@ class Config(ConfigSubsection):
 
                        base[names[-1]] = val
 
+                       if not base_file: # not the initial config file..
+                               #update config.x.y.value when exist
+                               configEntry = eval(name)
+                               if configEntry is not None:
+                                       configEntry.value = val
+
                # we inherit from ConfigSubsection, so ...
                #object.__setattr__(self, "saved_value", tree["config"])
                if "config" in tree:
@@ -1655,9 +1662,9 @@ class Config(ConfigSubsection):
                f.write(text)
                f.close()
 
-       def loadFromFile(self, filename):
+       def loadFromFile(self, filename, base_file=False):
                f = open(filename, "r")
-               self.unpickle(f.readlines())
+               self.unpickle(f.readlines(), base_file)
                f.close()
 
 config = Config()
@@ -1668,7 +1675,7 @@ class ConfigFile:
 
        def load(self):
                try:
-                       config.loadFromFile(self.CONFIG_FILE)
+                       config.loadFromFile(self.CONFIG_FILE, True)
                except IOError, e:
                        print "unable to load config (%s), assuming defaults..." % str(e)