diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2009-03-02 17:32:02 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2009-03-02 17:32:02 +0100 |
| commit | e68a1617b7c1efbedf8b28309943dd7669daaad0 (patch) | |
| tree | 2c45f065213b18f3a2c8a5e8666977f9bbff230d /lib/python/Plugins/Extensions | |
| parent | 8d2545bc513280abe52d9c0fc2b704de3729a11e (diff) | |
| parent | fe12fe9e0ab3a4f9751b67c0aa3751d5864784ba (diff) | |
| download | enigma2-e68a1617b7c1efbedf8b28309943dd7669daaad0.tar.gz enigma2-e68a1617b7c1efbedf8b28309943dd7669daaad0.zip | |
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Plugins/Extensions')
9 files changed, 24 insertions, 23 deletions
diff --git a/lib/python/Plugins/Extensions/CutListEditor/plugin.py b/lib/python/Plugins/Extensions/CutListEditor/plugin.py index 1ef15a53..ed7cfb70 100644 --- a/lib/python/Plugins/Extensions/CutListEditor/plugin.py +++ b/lib/python/Plugins/Extensions/CutListEditor/plugin.py @@ -317,7 +317,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He elif result == CutListContextMenu.RET_ENDCUT: # remove in/out marks between the new cut for (where, what) in self.cut_list[:]: - if self.cut_start <= where <= self.context_position and what in [0,1]: + if self.cut_start <= where <= self.context_position and what in (0,1): self.cut_list.remove((where, what)) bisect.insort(self.cut_list, (self.cut_start, 1)) @@ -350,7 +350,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He elif result == CutListContextMenu.RET_REMOVEBEFORE: # remove in/out marks before current position for (where, what) in self.cut_list[:]: - if where <= self.context_position and what in [0,1]: + if where <= self.context_position and what in (0,1): self.cut_list.remove((where, what)) # add 'in' point bisect.insort(self.cut_list, (self.context_position, 0)) @@ -358,7 +358,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He elif result == CutListContextMenu.RET_REMOVEAFTER: # remove in/out marks after current position for (where, what) in self.cut_list[:]: - if where >= self.context_position and what in [0,1]: + if where >= self.context_position and what in (0,1): self.cut_list.remove((where, what)) # add 'out' point bisect.insort(self.cut_list, (self.context_position, 1)) diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py b/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py index 40b85b70..1c2099fb 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py +++ b/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py @@ -154,7 +154,7 @@ class LanguageChoices(): if len(key) == 2: self.langdict[key] = val[0] for key, val in self.langdict.iteritems(): - if key not in [syslang, 'en']: + if key not in (syslang, 'en'): self.langdict[key] = val self.choices.append((key, val)) self.choices.sort() @@ -164,8 +164,7 @@ class LanguageChoices(): def getLanguage(self, DVB_lang): DVB_lang = DVB_lang.lower() - stripwords = ["stereo", "audio", "description", "2ch", "dolby digital"] - for word in stripwords: + for word in ("stereo", "audio", "description", "2ch", "dolby digital"): DVB_lang = DVB_lang.replace(word,"").strip() for key, val in LanguageCodes.iteritems(): if DVB_lang.find(key.lower()) == 0: @@ -183,4 +182,4 @@ class LanguageChoices(): return key return "nolang" -languageChoices = LanguageChoices()
\ No newline at end of file +languageChoices = LanguageChoices() diff --git a/lib/python/Plugins/Extensions/DVDBurn/plugin.py b/lib/python/Plugins/Extensions/DVDBurn/plugin.py index 29076cea..45f438da 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/plugin.py +++ b/lib/python/Plugins/Extensions/DVDBurn/plugin.py @@ -12,5 +12,6 @@ def main_add(session, service, **kwargs): dvdburn.selectedSource(service) def Plugins(**kwargs): - return [PluginDescriptor(name="DVD Burn", description=_("Burn to DVD..."), where = PluginDescriptor.WHERE_MOVIELIST, fnc=main_add, icon="dvdburn.png"), - PluginDescriptor(name="DVD Burn", description=_("Burn to DVD..."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main, icon="dvdburn.png") ] + descr = _("Burn to DVD...") + return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, fnc=main_add, icon="dvdburn.png"), + PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main, icon="dvdburn.png") ] diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index ce2e5938..ebcf4f81 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -723,7 +723,7 @@ def filescan(**kwargs): ScanPath(path = "", with_subdirs = False), ], name = "DVD", - description = "Play DVD", + description = _("Play DVD"), openfnc = filescan_open, )] diff --git a/lib/python/Plugins/Extensions/FileManager/plugin.py b/lib/python/Plugins/Extensions/FileManager/plugin.py index 12389813..62c9e7b2 100644 --- a/lib/python/Plugins/Extensions/FileManager/plugin.py +++ b/lib/python/Plugins/Extensions/FileManager/plugin.py @@ -59,5 +59,6 @@ def main(session, **kwargs): session.open(FileManager) def Plugins(**kwargs): - return [PluginDescriptor(name="File-Manager", description="Lets you view/edit files in your Dreambox", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), - PluginDescriptor(name="File-Manager", description="Lets you view/edit files in your Dreambox", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)] + descr = _("Lets you view/edit files in your Dreambox") + return [PluginDescriptor(name="File-Manager", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), + PluginDescriptor(name="File-Manager", description=descr, where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)] diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index e81750ba..e26c65d4 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -991,7 +991,7 @@ def filescan(**kwargs): ScanPath(path = "", with_subdirs = False), ], name = "Movie", - description = "View Movies...", + description = _("View Movies..."), openfnc = filescan_open, ), Scanner(mimetypes = ["video/x-vcd"], @@ -1001,7 +1001,7 @@ def filescan(**kwargs): ScanPath(path = "MPEGAV", with_subdirs = False), ], name = "Video CD", - description = "View Video CD...", + description = _("View Video CD..."), openfnc = filescan_open, ), Scanner(mimetypes = ["audio/mpeg", "audio/x-wav", "application/ogg", "audio/x-flac"], @@ -1010,7 +1010,7 @@ def filescan(**kwargs): ScanPath(path = "", with_subdirs = False), ], name = "Music", - description = "Play Music...", + description = _("Play Music..."), openfnc = filescan_open, )] try: @@ -1022,7 +1022,7 @@ def filescan(**kwargs): ScanPath(path = "", with_subdirs = False), ], name = "Audio-CD", - description = "Play Audio-CD...", + description = _("Play Audio-CD..."), openfnc = audioCD_open, )) return mediatypes diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py index 2c31197d..0cefa353 100755 --- a/lib/python/Plugins/Extensions/MediaScanner/plugin.py +++ b/lib/python/Plugins/Extensions/MediaScanner/plugin.py @@ -23,16 +23,16 @@ def mountpoint_choosen(option): list = [ (r.description, r, res[r], session) for r in res ] - if list == [ ]: + if not list: from Screens.MessageBox import MessageBox if access(mountpoint, F_OK|R_OK): - session.open(MessageBox, "No displayable files on this medium found!", MessageBox.TYPE_ERROR) + session.open(MessageBox, _("No displayable files on this medium found!"), MessageBox.TYPE_ERROR) else: print "ignore", mountpoint, "because its not accessible" return session.openWithCallback(execute, ChoiceBox, - title = "The following files were found...", + title = _("The following files were found..."), list = list) def scan(session): @@ -41,7 +41,7 @@ def scan(session): from Components.Harddisk import harddiskmanager parts = [ (r.description, r.mountpoint, session) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)] - if len(parts): + if parts: for x in parts: if not access(x[1], F_OK|R_OK): parts.remove(x) @@ -91,7 +91,7 @@ def autostart(reason, **kwargs): def Plugins(**kwargs): return [ - PluginDescriptor(name="MediaScanner", description="Scan Files...", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), + PluginDescriptor(name="MediaScanner", description=_("Scan Files..."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), # PluginDescriptor(where = PluginDescriptor.WHERE_MENU, fnc=menuHook), PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart), PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py index 05adb633..10e4e514 100644 --- a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py +++ b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py @@ -586,7 +586,7 @@ def filescan(**kwargs): ScanPath(path = "", with_subdirs = False), ], name = "Pictures", - description = "View Photos...", + description = _("View Photos..."), openfnc = filescan_open, ) diff --git a/lib/python/Plugins/Extensions/SocketMMI/plugin.py b/lib/python/Plugins/Extensions/SocketMMI/plugin.py index 4eadf2ea..387c8306 100644 --- a/lib/python/Plugins/Extensions/SocketMMI/plugin.py +++ b/lib/python/Plugins/Extensions/SocketMMI/plugin.py @@ -22,6 +22,6 @@ def autostart(reason, **kwargs): socketHandler = SocketMMIMessageHandler() def Plugins(**kwargs): - return [ PluginDescriptor(name = "SocketMMI", description = "Python frontend for /tmp/mmi.socket", where = PluginDescriptor.WHERE_MENU, fnc = menu), + return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, fnc = menu), PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart), PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) ] |
