diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-17 10:04:02 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-17 10:04:02 +0100 |
| commit | 37b38cb05fc6bc4993f852a78bdba93c7627cf5b (patch) | |
| tree | 67b0f7159bea05a067626d719ac67d81979d547b /lib/python/Components | |
| parent | 083c49ace50d1aa702cf47785e0d38966f8e71a1 (diff) | |
| parent | 153e0ed5048c79c600e1acd085b62015b7314ba7 (diff) | |
| download | enigma2-37b38cb05fc6bc4993f852a78bdba93c7627cf5b.tar.gz enigma2-37b38cb05fc6bc4993f852a78bdba93c7627cf5b.zip | |
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/Language.py | 1 | ||||
| -rw-r--r-- | lib/python/Components/MovieList.py | 38 | ||||
| -rw-r--r-- | lib/python/Components/UsageConfig.py | 5 |
3 files changed, 30 insertions, 14 deletions
diff --git a/lib/python/Components/Language.py b/lib/python/Components/Language.py index acb50e51..6d1e31f3 100644 --- a/lib/python/Components/Language.py +++ b/lib/python/Components/Language.py @@ -35,6 +35,7 @@ class Language: self.addLanguage(_("Spanish"), "es", "ES") self.addLanguage(_("Swedish"), "sv", "SE") self.addLanguage(_("Turkish"), "tr", "TR") + self.addLanguage(_("Ukrainian"), "uk", "UA") self.callbacks = [] diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py index ace36012..8568f3d6 100644 --- a/lib/python/Components/MovieList.py +++ b/lib/python/Components/MovieList.py @@ -103,7 +103,8 @@ class MovieList(GUIComponent): txt = info.getName(serviceref) service = ServiceReference(info.getInfoString(serviceref, iServiceInformation.sServiceref)) description = info.getInfoString(serviceref, iServiceInformation.sDescription) - + tags = info.getInfoString(serviceref, iServiceInformation.sTags) + begin_string = "" if begin > 0: t = FuzzyTime(begin) @@ -111,23 +112,33 @@ class MovieList(GUIComponent): if self.list_type == MovieList.LISTTYPE_ORIGINAL: res.append(MultiContentEntryText(pos=(0, 0), size=(width-182, 30), font = 0, flags = RT_HALIGN_LEFT, text=txt)) - if service is not None: - res.append(MultiContentEntryText(pos=(width-180, 0), size=(180, 30), font = 2, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) + if self.tags: + res.append(MultiContentEntryText(pos=(width-180, 0), size=(180, 30), font = 2, flags = RT_HALIGN_RIGHT, text = tags)) + if service is not None: + res.append(MultiContentEntryText(pos=(200, 50), size=(200, 20), font = 1, flags = RT_HALIGN_LEFT, text = service.getServiceName())) + else: + if service is not None: + res.append(MultiContentEntryText(pos=(width-180, 0), size=(180, 30), font = 2, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) res.append(MultiContentEntryText(pos=(0, 30), size=(width, 20), font=1, flags=RT_HALIGN_LEFT, text=description)) - res.append(MultiContentEntryText(pos=(0, 50), size=(width-270, 20), font=1, flags=RT_HALIGN_LEFT, text=begin_string)) - res.append(MultiContentEntryText(pos=(width-200, 50), size=(200, 20), font=1, flags=RT_HALIGN_RIGHT, text=len)) + res.append(MultiContentEntryText(pos=(0, 50), size=(200, 20), font=1, flags=RT_HALIGN_LEFT, text=begin_string)) + res.append(MultiContentEntryText(pos=(width-200, 50), size=(198, 20), font=1, flags=RT_HALIGN_RIGHT, text=len)) elif self.list_type == MovieList.LISTTYPE_COMPACT_DESCRIPTION: res.append(MultiContentEntryText(pos=(0, 0), size=(width-120, 20), font = 0, flags = RT_HALIGN_LEFT, text = txt)) - if service is not None: - res.append(MultiContentEntryText(pos=(width-212, 20), size=(154, 17), font = 1, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) res.append(MultiContentEntryText(pos=(0, 20), size=(width-212, 17), font=1, flags=RT_HALIGN_LEFT, text=description)) res.append(MultiContentEntryText(pos=(width-120, 6), size=(120, 20), font=1, flags=RT_HALIGN_RIGHT, text=begin_string)) + if service is not None: + res.append(MultiContentEntryText(pos=(width-212, 20), size=(154, 17), font = 1, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) res.append(MultiContentEntryText(pos=(width-58, 20), size=(58, 20), font=1, flags=RT_HALIGN_RIGHT, text=len)) elif self.list_type == MovieList.LISTTYPE_COMPACT: res.append(MultiContentEntryText(pos=(0, 0), size=(width-77, 20), font = 0, flags = RT_HALIGN_LEFT, text = txt)) - if service is not None: - res.append(MultiContentEntryText(pos=(width-200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) - res.append(MultiContentEntryText(pos=(0, 20), size=(width-200, 17), font=1, flags=RT_HALIGN_LEFT, text=begin_string)) + if self.tags: + res.append(MultiContentEntryText(pos=(width-200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_RIGHT, text = tags)) + if service is not None: + res.append(MultiContentEntryText(pos=(200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_LEFT, text = service.getServiceName())) + else: + if service is not None: + res.append(MultiContentEntryText(pos=(width-200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) + res.append(MultiContentEntryText(pos=(0, 20), size=(200, 17), font=1, flags=RT_HALIGN_LEFT, text=begin_string)) res.append(MultiContentEntryText(pos=(width-75, 0), size=(75, 20), font=0, flags=RT_HALIGN_RIGHT, text=len)) else: assert(self.list_type == MovieList.LISTTYPE_MINIMAL) @@ -212,6 +223,7 @@ class MovieList(GUIComponent): if this_tags == ['']: this_tags = [] this_tags = set(this_tags) + tags |= this_tags # filter_tags is either None (which means no filter at all), or # a set. In this case, all elements of filter_tags must be present, @@ -219,7 +231,6 @@ class MovieList(GUIComponent): if filter_tags is not None and not this_tags.issuperset(filter_tags): continue - tags |= this_tags self.list.append((serviceref, info, begin, -1)) if self.sort_type == MovieList.SORT_ALPHANUMERIC: @@ -243,8 +254,9 @@ class MovieList(GUIComponent): for x in self.list: if x[0] == serviceref: self.instance.moveSelectionTo(count) - break + return True count += 1 - + return False + def moveDown(self): self.instance.moveSelection(self.instance.moveDown) diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 714d366d..6ed87840 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -1,5 +1,5 @@ from Components.Harddisk import harddiskmanager -from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet +from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet, ConfigLocations from enigma import Misc_Options, setTunerTypePriorityOrder; from SystemInfo import SystemInfo import os @@ -30,6 +30,9 @@ def InitUsageConfig(): ("standard", _("standard")), ("swap", _("swap PiP and main picture")), ("swapstop", _("move PiP to main picture")), ("stop", _("stop PiP")) ]) + config.usage.allowed_timeshift_paths = ConfigLocations(default = ["/media/hdd/"]) + config.usage.timeshift_path = ConfigText(default = "/media/hdd") + config.usage.on_movie_start = ConfigSelection(default = "ask", choices = [ ("ask", _("Ask user")), ("resume", _("Resume from last position")), ("beginning", _("Start from the beginning")) ]) config.usage.on_movie_stop = ConfigSelection(default = "ask", choices = [ |
