add possibility to disable loading the length of movies (experts only, sorry)
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 5 Oct 2008 22:37:19 +0000 (22:37 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 5 Oct 2008 22:37:19 +0000 (22:37 +0000)
data/setup.xml
lib/python/Components/MovieList.py
lib/python/Components/UsageConfig.py

index eca3265..e2ab09b 100644 (file)
@@ -22,6 +22,7 @@
                        <item level="0" text="Margin before record (minutes)">config.recording.margin_before</item>
                        <item level="0" text="Margin after record">config.recording.margin_after</item>
                        <item level="0" text="Show blinking clock in display during recording">config.usage.blinking_display_clock_during_recording</item>
                        <item level="0" text="Margin before record (minutes)">config.recording.margin_before</item>
                        <item level="0" text="Margin after record">config.recording.margin_after</item>
                        <item level="0" text="Show blinking clock in display during recording">config.usage.blinking_display_clock_during_recording</item>
+                       <item level="2" text="Load Length of Movies in Movielist">config.usage.load_length_of_movies_in_moviellist</item>
                        <item level="1" text="Show positioner movement">config.usage.showdish</item>
                        <item level="1" text="Enable multiple bouquets">config.usage.multibouquet</item>
                        <item level="1" text="Change bouquets in quickzap">config.usage.quickzap_bouquet_change</item>
                        <item level="1" text="Show positioner movement">config.usage.showdish</item>
                        <item level="1" text="Enable multiple bouquets">config.usage.multibouquet</item>
                        <item level="1" text="Change bouquets in quickzap">config.usage.quickzap_bouquet_change</item>
index a0bd733..ace3601 100644 (file)
@@ -2,6 +2,7 @@ from GUIComponent import GUIComponent
 from Tools.FuzzyDate import FuzzyTime
 from ServiceReference import ServiceReference
 from Components.MultiContent import MultiContentEntryText
 from Tools.FuzzyDate import FuzzyTime
 from ServiceReference import ServiceReference
 from Components.MultiContent import MultiContentEntryText
+from Components.config import config
 
 from enigma import eListboxPythonMultiContent, eListbox, gFont, iServiceInformation, \
        RT_HALIGN_LEFT, RT_HALIGN_RIGHT, eServiceReference, eServiceCenter
 
 from enigma import eListboxPythonMultiContent, eListbox, gFont, iServiceInformation, \
        RT_HALIGN_LEFT, RT_HALIGN_RIGHT, eServiceReference, eServiceCenter
@@ -83,13 +84,19 @@ class MovieList(GUIComponent):
                if len <= 0: #recalc len when not already done
                        cur_idx = self.l.getCurrentSelectionIndex()
                        x = self.list[cur_idx]
                if len <= 0: #recalc len when not already done
                        cur_idx = self.l.getCurrentSelectionIndex()
                        x = self.list[cur_idx]
-                       len = x[1].getLength(x[0]) #recalc the movie length...
+                       if config.usage.load_length_of_movies_in_moviellist.value:
+                               len = x[1].getLength(x[0]) #recalc the movie length...
+                       else:
+                               len = 0 #dont recalc movielist to speedup loading the list
                        self.list[cur_idx] = (x[0], x[1], x[2], len) #update entry in list... so next time we don't need to recalc
                
                if len > 0:
                        len = "%d:%02d" % (len / 60, len % 60)
                else:
                        self.list[cur_idx] = (x[0], x[1], x[2], len) #update entry in list... so next time we don't need to recalc
                
                if len > 0:
                        len = "%d:%02d" % (len / 60, len % 60)
                else:
-                       len = "?:??"
+                       if config.usage.load_length_of_movies_in_moviellist.value:
+                               len = "?:??"
+                       else:
+                               len = "X:XX"
                
                res = [ None ]
                
                
                res = [ None ]
                
index d9fb2a5..714d366 100644 (file)
@@ -55,7 +55,8 @@ def InitUsageConfig():
                ("5", "DVB-T/-S/-C") ])
 
        config.usage.blinking_display_clock_during_recording = ConfigYesNo(default = False)
                ("5", "DVB-T/-S/-C") ])
 
        config.usage.blinking_display_clock_during_recording = ConfigYesNo(default = False)
-
+       config.usage.load_length_of_movies_in_moviellist = ConfigYesNo(default = True)
+       
        def TunerTypePriorityOrderChanged(configElement):
                setTunerTypePriorityOrder(int(configElement.value))
        config.usage.alternatives_priority.addNotifier(TunerTypePriorityOrderChanged)
        def TunerTypePriorityOrderChanged(configElement):
                setTunerTypePriorityOrder(int(configElement.value))
        config.usage.alternatives_priority.addNotifier(TunerTypePriorityOrderChanged)