From da583812c4b20dcf72b69415d65dc1398fd849ce Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 26 Jul 2010 12:30:11 +0200 Subject: add experimental vobsub support (requires gst-plugin-dvdsub) / ignore PGS subs (fixes #537) --- lib/python/Screens/AudioSelection.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py index a0bfcab9..068da870 100644 --- a/lib/python/Screens/AudioSelection.py +++ b/lib/python/Screens/AudioSelection.py @@ -46,7 +46,7 @@ class AudioSelection(Screen, ConfigListScreen): "cancel": self.cancel, "up": self.keyUp, "down": self.keyDown, - }, -3) + }, -2) self.settings = ConfigSubsection() choicelist = [(PAGE_AUDIO,_("audio tracks")), (PAGE_SUBTITLES,_("Subtitles"))] @@ -62,13 +62,12 @@ class AudioSelection(Screen, ConfigListScreen): streams = [] conflist = [] selectedidx = 0 - - service = self.session.nav.getCurrentService() - self.audioTracks = audio = service and service.audioTracks() - n = audio and audio.getNumberOfTracks() or 0 - + if self.settings.menupage.getValue() == PAGE_AUDIO: self.setTitle(_("Select audio track")) + service = self.session.nav.getCurrentService() + self.audioTracks = audio = service and service.audioTracks() + n = audio and audio.getNumberOfTracks() or 0 if SystemInfo["CanDownmixAC3"]: self.settings.downmix = ConfigOnOff(default=config.av.downmix_ac3.value) self.settings.downmix.addNotifier(self.changeAC3Downmix, initial_call = False) @@ -156,7 +155,7 @@ class AudioSelection(Screen, ConfigListScreen): number = "%x%02x" % (x[3],x[2]) elif x[0] == 2: - types = ("UTF-8 text","SSA / AAS",".SRT file") + types = (_(""), "UTF-8 text", "SSA", "AAS", ".SRT file", "VOB", "PGS (unsupported)") description = types[x[2]] streams.append((x, "", number, description, language, selected)) @@ -185,7 +184,7 @@ class AudioSelection(Screen, ConfigListScreen): conflist.append(getConfigListEntry(Plugins[0][0], ConfigNothing())) self.plugincallfunc = Plugins[0][1] if len(Plugins) > 1: - print "these plugins are installed but not displayed in the dialog box:", Plugins[1:] + print "plugin(s) installed but not displayed in the dialog box:", Plugins[1:] self["config"].list = conflist self["config"].l.setList(conflist) -- cgit v1.2.3 From a648830a100839cb95548cffe2a6cd291f8da19c Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 17 Aug 2010 10:18:13 +0200 Subject: Playback/Skipping fixes / cleanup by A. Holst * Jumping between marks in the movie, with "<" and ">", doesn't work well when there are cut marks in the movie. Especially jumping backwards will fail if there is a mark in a cut out region that is to be jumped over. (InfoBarGenerics.py, chunks 3 and 4) * Now when rewind works at all platforms also at low speeds, the rewind speeds x2 and x4 should be added again to the default. (UsageConfig.py, chunk 1) * Cleanup some obsolete code: SeekBackHack and non-smooth winding. None of these can be used anymore, but remnants were left in the code and in the configuration alternatives. It is high time to clean these out. (setup.xml, UsageConfig.py chunk 2, InfoBarGenerics.py chunks 1 and 2, DVDPlayer) * In the position gauge of the movie player, marks in the movie are shown as red dots. Long time ago the last position was also shown as a red dot, which was bad because it was confused with the marks, so it was removed. However, jumping between marks in the movie with "<" and ">" also stops at the last position, which is useful e.g. if you don't automatically start playing from the last position. The code below adds the last position back to the position gauge as a green dot, to distinguish it from the red ones. (epositiongauge.cpp) refs bug #570 --- data/setup.xml | 25 +++------------- lib/dvb/pvrparse.cpp | 2 +- lib/gui/epositiongauge.cpp | 22 +++++++++----- lib/python/Components/UsageConfig.py | 4 +-- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 8 +---- lib/python/Screens/InfoBarGenerics.py | 36 ++++++++++------------- 6 files changed, 37 insertions(+), 60 deletions(-) (limited to 'lib/python') diff --git a/data/setup.xml b/data/setup.xml index 9425afda..fa8ff3f9 100644 --- a/data/setup.xml +++ b/data/setup.xml @@ -45,27 +45,10 @@ config.seek.speeds_forward config.seek.speeds_backward config.seek.speeds_slowmotion - - config.seek.enter_forward - config.seek.enter_backward - - config.seek.stepwise_minspeed - config.seek.stepwise_repeat + + config.seek.enter_forward + config.seek.enter_backward config.seek.on_pause config.usage.pip_zero_button config.usage.alternatives_priority diff --git a/lib/dvb/pvrparse.cpp b/lib/dvb/pvrparse.cpp index 5cdecbd6..e19dd1e4 100644 --- a/lib/dvb/pvrparse.cpp +++ b/lib/dvb/pvrparse.cpp @@ -123,7 +123,7 @@ void eMPEGStreamInformation::fixupDiscontinuties() pts_t current = i->second - currentDelta; pts_t diff = current - lastpts_t; - if (llabs(diff) > (90000*5)) // 5sec diff + if (llabs(diff) > (90000*10)) // 10sec diff { // eDebug("%llx < %llx, have discont. new timestamp is %llx (diff is %llx)!", current, lastpts_t, i->second, diff); currentDelta = i->second - lastpts_t; /* FIXME: should be the extrapolated new timestamp, based on the current rate */ diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp index ff98c080..e45d4a6c 100644 --- a/lib/gui/epositiongauge.cpp +++ b/lib/gui/epositiongauge.cpp @@ -112,6 +112,7 @@ int ePositionGauge::event(int event, void *data, void *data2) // painter.fill(eRect(0, 10, s.width(), s.height()-20)); pts_t in = 0, out = 0; + int xm, xm_last = -1; std::multiset::iterator i(m_cue_entries.begin()); @@ -126,17 +127,22 @@ int ePositionGauge::event(int event, void *data, void *data2) continue; } else if (i->what == 1) /* out */ out = i++->where; - else if (i->what == 2) /* mark */ + else /* mark or last */ { - int xm = scale(i->where); - painter.setForegroundColor(gRGB(0xFF8080)); - painter.fill(eRect(xm - 2, 0, 4, s.height())); + xm = scale(i->where); + if (i->what == 2) { + painter.setForegroundColor(gRGB(0xFF8080)); + if (xm - 2 < xm_last) /* Make sure last is not overdrawn */ + painter.fill(eRect(xm_last, 0, 2 + xm - xm_last, s.height())); + else + painter.fill(eRect(xm - 2, 0, 4, s.height())); + } else if (i->what == 3) { + painter.setForegroundColor(gRGB(0x80FF80)); + painter.fill(eRect(xm - 1, 0, 3, s.height())); + xm_last = xm + 2; + } i++; continue; - } else /* other marker, like last position */ - { - ++i; - continue; } } diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 60827107..c0213d99 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -93,13 +93,11 @@ def InitUsageConfig(): config.seek.selfdefined_79 = ConfigNumber(default=300) config.seek.speeds_forward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) - config.seek.speeds_backward = ConfigSet(default=[8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) + config.seek.speeds_backward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) config.seek.speeds_slowmotion = ConfigSet(default=[2, 4, 8], choices=[2, 4, 6, 8, 12, 16, 25]) config.seek.enter_forward = ConfigSelection(default = "2", choices = ["2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) config.seek.enter_backward = ConfigSelection(default = "1", choices = ["1", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) - config.seek.stepwise_minspeed = ConfigSelection(default = "16", choices = ["Never", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) - config.seek.stepwise_repeat = ConfigSelection(default = "3", choices = ["2", "3", "4", "5", "6"]) config.seek.on_pause = ConfigSelection(default = "play", choices = [ ("play", _("Play")), diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index e092e82f..3d262c92 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -222,8 +222,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.saved_config_speeds_backward = config.seek.speeds_backward.value self.saved_config_enter_forward = config.seek.enter_forward.value self.saved_config_enter_backward = config.seek.enter_backward.value - self.saved_config_seek_stepwise_minspeed = config.seek.stepwise_minspeed.value - self.saved_config_seek_stepwise_repeat = config.seek.stepwise_repeat.value self.saved_config_seek_on_pause = config.seek.on_pause.value self.saved_config_seek_speeds_slowmotion = config.seek.speeds_slowmotion.value @@ -233,8 +231,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP config.seek.speeds_slowmotion.value = [ ] config.seek.enter_forward.value = "2" config.seek.enter_backward.value = "2" - config.seek.stepwise_minspeed.value = "Never" - config.seek.stepwise_repeat.value = "3" config.seek.on_pause.value = "play" def restore_infobar_seek_config(self): @@ -243,8 +239,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP config.seek.speeds_slowmotion.value = self.saved_config_seek_speeds_slowmotion config.seek.enter_forward.value = self.saved_config_enter_forward config.seek.enter_backward.value = self.saved_config_enter_backward - config.seek.stepwise_minspeed.value = self.saved_config_seek_stepwise_minspeed - config.seek.stepwise_repeat.value = self.saved_config_seek_stepwise_repeat config.seek.on_pause.value = self.saved_config_seek_on_pause def __init__(self, session, dvd_device = None, dvd_filelist = [ ], args = None): @@ -256,7 +250,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP HelpableScreen.__init__(self) self.save_infobar_seek_config() self.change_infobar_seek_config() - InfoBarSeek.__init__(self, useSeekBackHack=False) + InfoBarSeek.__init__(self) InfoBarPVRState.__init__(self) self.dvdScreen = self.session.instantiateDialog(DVDOverlay) diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index f98d4c33..4bcadef9 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -716,7 +716,7 @@ class InfoBarSeek: SEEK_STATE_PAUSE = (1, 0, 0, "||") SEEK_STATE_EOF = (1, 0, 0, "END") - def __init__(self, actionmap = "InfobarSeekActions", useSeekBackHack=True): + def __init__(self, actionmap = "InfobarSeekActions"): self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged, @@ -773,20 +773,10 @@ class InfoBarSeek: self.__seekableStatusChanged() def makeStateForward(self, n): -# minspeed = config.seek.stepwise_minspeed.value -# repeat = int(config.seek.stepwise_repeat.value) -# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: -# return (0, n * repeat, repeat, ">> %dx" % n) -# else: - return (0, n, 0, ">> %dx" % n) + return (0, n, 0, ">> %dx" % n) def makeStateBackward(self, n): -# minspeed = config.seek.stepwise_minspeed.value -# repeat = int(config.seek.stepwise_repeat.value) -# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: -# return (0, -n * repeat, repeat, "<< %dx" % n) -# else: - return (0, -n, 0, "<< %dx" % n) + return (0, -n, 0, "<< %dx" % n) def makeStateSlowMotion(self, n): return (0, 0, n, "/%d" % n) @@ -2084,20 +2074,21 @@ class InfoBarCueSheetSupport: return True def jumpPreviousMark(self): - # we add 2 seconds, so if the play position is <2s after + # we add 5 seconds, so if the play position is <5s after # the mark, the mark before will be used self.jumpPreviousNextMark(lambda x: -x-5*90000, start=True) def jumpNextMark(self): - if not self.jumpPreviousNextMark(lambda x: x): + if not self.jumpPreviousNextMark(lambda x: x-90000): self.doSeek(-1) def getNearestCutPoint(self, pts, cmp=abs, start=False): # can be optimized - beforecut = False + beforecut = True nearest = None + bestdiff = -1 + instate = True if start: - beforecut = True bestdiff = cmp(0 - pts) if bestdiff >= 0: nearest = [0, False] @@ -2106,14 +2097,19 @@ class InfoBarCueSheetSupport: beforecut = False if cp[1] == self.CUT_TYPE_IN: # Start is here, disregard previous marks diff = cmp(cp[0] - pts) - if diff >= 0: + if start and diff >= 0: nearest = cp bestdiff = diff else: nearest = None - if cp[1] in (self.CUT_TYPE_MARK, self.CUT_TYPE_LAST): + bestdiff = -1 + if cp[1] == self.CUT_TYPE_IN: + instate = True + elif cp[1] == self.CUT_TYPE_OUT: + instate = False + elif cp[1] in (self.CUT_TYPE_MARK, self.CUT_TYPE_LAST): diff = cmp(cp[0] - pts) - if diff >= 0 and (nearest is None or bestdiff > diff): + if instate and diff >= 0 and (nearest is None or bestdiff > diff): nearest = cp bestdiff = diff return nearest -- cgit v1.2.3 From 6a243eb89df7c0afd159a0820c897a8b5fcd8211 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 23 Nov 2010 12:40:58 +0100 Subject: enable m2ts file extension --- lib/python/Components/FileList.py | 3 ++- lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 1d71514b..1b7e81f5 100755 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -28,7 +28,8 @@ EXTENSIONS = { "mpeg": "movie", "mkv": "movie", "mp4": "movie", - "mov": "movie" + "mov": "movie", + "m2ts": "movie", } def FileEntryComponent(name, absolute = None, isDir = False): diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 9ae886fc..d61dbc76 100755 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -110,7 +110,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() - self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") + self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov|m2ts)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() -- cgit v1.2.3 From a02b205a9e7009fdcd52c12be88eeb2ca28835db Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 20 Dec 2010 23:21:59 +0100 Subject: TimerSanityCheck.py: ignore ended singleshot timers in timersanity check (speedup) fixes #635 --- lib/python/Components/TimerSanityCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Components/TimerSanityCheck.py b/lib/python/Components/TimerSanityCheck.py index b472a19e..dc1b519f 100644 --- a/lib/python/Components/TimerSanityCheck.py +++ b/lib/python/Components/TimerSanityCheck.py @@ -107,7 +107,7 @@ class TimerSanityCheck: self.rep_eventlist.append((begin, idx)) begin += 86400 rflags >>= 1 - else: + elif timer.state < TimerEntry.StateEnded: self.nrep_eventlist.extend([(timer.begin,self.bflag,idx),(timer.end,self.eflag,idx)]) idx += 1 -- cgit v1.2.3 From 68d7804ff72c80b4ba7c4e64e6a3ae36c1bad68b Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 20 Dec 2010 23:40:40 +0100 Subject: add missing import refs #635 --- lib/python/Components/TimerSanityCheck.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python') diff --git a/lib/python/Components/TimerSanityCheck.py b/lib/python/Components/TimerSanityCheck.py index dc1b519f..b9dda6a6 100644 --- a/lib/python/Components/TimerSanityCheck.py +++ b/lib/python/Components/TimerSanityCheck.py @@ -2,6 +2,7 @@ import NavigationInstance from time import localtime, mktime, gmtime from ServiceReference import ServiceReference from enigma import iServiceInformation, eServiceCenter, eServiceReference +from timer import TimerEntry class TimerSanityCheck: def __init__(self, timerlist, newtimer=None): -- cgit v1.2.3 From 79f0f14b59c1943261983e92f0b97b9ce7df4bed Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Wed, 26 Jan 2011 15:15:33 +0100 Subject: fix restart of playback after EOF (fixes bug #241) --- lib/python/Screens/InfoBar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 5b061245..a6403a30 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -174,7 +174,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ (_("Yes, returning to movie list"), "movielist"), (_("Yes, and delete this movie"), "quitanddelete"), (_("No"), "continue"), - (_("No, but restart from begin"), "restart") + (_("No, but restart from the beginning"), "restart") ) from Screens.ChoiceBox import ChoiceBox @@ -221,6 +221,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ self.session.nav.stopService() elif answer == "restart": self.doSeek(0) + self.setSeekState(self.SEEK_STATE_PLAY) def doEofInternal(self, playing): if not self.execing: -- cgit v1.2.3 From a1ffc0e6e0f33d5b9435e82123513b1dbb6a1c6c Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Wed, 26 Jan 2011 15:29:19 +0100 Subject: Revert "fix restart of playback after EOF (fixes bug #241)" This reverts commit 79f0f14b59c1943261983e92f0b97b9ce7df4bed. --- lib/python/Screens/InfoBar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index a6403a30..5b061245 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -174,7 +174,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ (_("Yes, returning to movie list"), "movielist"), (_("Yes, and delete this movie"), "quitanddelete"), (_("No"), "continue"), - (_("No, but restart from the beginning"), "restart") + (_("No, but restart from begin"), "restart") ) from Screens.ChoiceBox import ChoiceBox @@ -221,7 +221,6 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ self.session.nav.stopService() elif answer == "restart": self.doSeek(0) - self.setSeekState(self.SEEK_STATE_PLAY) def doEofInternal(self, playing): if not self.execing: -- cgit v1.2.3 From 7fb088ec04db7eb68ff7294393f53ba33f533655 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Wed, 26 Jan 2011 15:29:53 +0100 Subject: fix restart of playback after EOF (fixes bug #241) --- lib/python/Screens/InfoBar.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 5b061245..55062878 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -221,6 +221,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ self.session.nav.stopService() elif answer == "restart": self.doSeek(0) + self.setSeekState(self.SEEK_STATE_PLAY) def doEofInternal(self, playing): if not self.execing: -- cgit v1.2.3 From 3698155ca276e4ea2a39ac00a29cc6cb241c28e6 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 27 Jan 2011 17:01:31 +0100 Subject: allow AudioSelection screens for services without ChannelSelection interface (needed for #440 DVD player AudioSelection) --- lib/python/Screens/AudioSelection.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py index a0bfcab9..576fd381 100644 --- a/lib/python/Screens/AudioSelection.py +++ b/lib/python/Screens/AudioSelection.py @@ -77,11 +77,15 @@ class AudioSelection(Screen, ConfigListScreen): if n > 0: self.audioChannel = service.audioChannel() - choicelist = [("0",_("left")), ("1",_("stereo")), ("2", _("right"))] - self.settings.channelmode = ConfigSelection(choices = choicelist, default = str(self.audioChannel.getCurrentChannel())) - self.settings.channelmode.addNotifier(self.changeMode, initial_call = False) - conflist.append(getConfigListEntry(_("Channel"), self.settings.channelmode)) - self["key_green"].setBoolean(True) + if self.audioChannel: + choicelist = [("0",_("left")), ("1",_("stereo")), ("2", _("right"))] + self.settings.channelmode = ConfigSelection(choices = choicelist, default = str(self.audioChannel.getCurrentChannel())) + self.settings.channelmode.addNotifier(self.changeMode, initial_call = False) + conflist.append(getConfigListEntry(_("Channel"), self.settings.channelmode)) + self["key_green"].setBoolean(True) + else: + conflist.append(getConfigListEntry("", ConfigNothing())) + self["key_green"].setBoolean(False) selectedAudio = self.audioTracks.getCurrentTrack() for x in range(n): number = str(x) @@ -156,7 +160,7 @@ class AudioSelection(Screen, ConfigListScreen): number = "%x%02x" % (x[3],x[2]) elif x[0] == 2: - types = ("UTF-8 text","SSA / AAS",".SRT file") + types = ("UTF-8 text","SSA / AAS",".SRT file","VOB") description = types[x[2]] streams.append((x, "", number, description, language, selected)) @@ -219,7 +223,7 @@ class AudioSelection(Screen, ConfigListScreen): config.av.downmix_ac3.save() def changeMode(self, mode): - if mode is not None: + if mode is not None and self.audioChannel: self.audioChannel.selectChannel(int(mode.getValue())) def changeAudio(self, audio): -- cgit v1.2.3 From 59b783ebcdd871129087219a6ee1929e46e7a2e6 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 27 Jan 2011 17:02:54 +0100 Subject: implement native e2 audio and subtitle track selection interfaces to enable AudioSelection Dialog for DVDPlayer (#440) [needs libdreamdvd update] --- .../Extensions/DVDPlayer/src/servicedvd.cpp | 82 +++++++++++++++++++++- .../Plugins/Extensions/DVDPlayer/src/servicedvd.h | 13 +++- 2 files changed, 90 insertions(+), 5 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index 5fbfb0aa..da9c0bb7 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -397,6 +397,64 @@ RESULT eServiceDVD::subtitle(ePtr &ptr) return 0; } +RESULT eServiceDVD::audioTracks(ePtr &ptr) +{ + ptr = this; + return 0; +} + +int eServiceDVD::getNumberOfTracks() +{ + int i = 0; + ddvd_get_audio_count(m_ddvdconfig, &i); + eDebug("getNumberOfTracks returns %i", i); + return i; +} + +int eServiceDVD::getCurrentTrack() +{ + int audio_id,audio_type; + uint16_t audio_lang; + ddvd_get_last_audio(m_ddvdconfig, &audio_id, &audio_lang, &audio_type); + eDebug("getCurrentTrack returns %i", audio_id); + return audio_id; +} + +RESULT eServiceDVD::selectTrack(unsigned int i) +{ + ddvd_set_audio(m_ddvdconfig, i); + eDebug("selectTrack %i", i); + return 0; +} + +RESULT eServiceDVD::getTrackInfo(struct iAudioTrackInfo &info, unsigned int audio_id) +{ + int audio_type; + uint16_t audio_lang; + ddvd_get_audio_byid(m_ddvdconfig, audio_id, &audio_lang, &audio_type); + char audio_string[3]={audio_lang >> 8, audio_lang, 0}; + info.m_pid = audio_id+1; + info.m_language = audio_string; + switch(audio_type) + { + case DDVD_MPEG: + info.m_description = "MPEG"; + break; + case DDVD_AC3: + info.m_description = "AC3"; + break; + case DDVD_DTS: + info.m_description = "DTS"; + break; + case DDVD_LPCM: + info.m_description = "LPCM"; + break; + default: + info.m_description = "und"; + } + return 0; +} + RESULT eServiceDVD::keys(ePtr &ptr) { ptr=this; @@ -659,8 +717,28 @@ RESULT eServiceDVD::disableSubtitles(eWidget */*parent*/) PyObject *eServiceDVD::getSubtitleList() { - eDebug("eServiceDVD::getSubtitleList nyi"); - Py_RETURN_NONE; + eDebug("eServiceMP3::getSubtitleList"); + + ePyObject l = PyList_New(0); + unsigned int spu_count = 0; + ddvd_get_spu_count(m_ddvdconfig, &spu_count); + + for ( unsigned int spu_id = 0; spu_id < spu_count; spu_id++ ) + { + uint16_t spu_lang; + ddvd_get_spu_byid(m_ddvdconfig, spu_id, &spu_lang); + char spu_string[3]={spu_lang >> 8, spu_lang, 0}; + + ePyObject tuple = PyTuple_New(5); + PyTuple_SetItem(tuple, 0, PyInt_FromLong(2)); + PyTuple_SetItem(tuple, 1, PyInt_FromLong(0)); + PyTuple_SetItem(tuple, 2, PyInt_FromLong(3)); + PyTuple_SetItem(tuple, 3, PyInt_FromLong(0)); + PyTuple_SetItem(tuple, 4, PyString_FromString(spu_string)); + PyList_Append(l, tuple); + Py_DECREF(tuple); + } + return l; } PyObject *eServiceDVD::getCachedSubtitle() diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h index c751a394..80cfcf0c 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h @@ -26,7 +26,7 @@ public: RESULT offlineOperations(const eServiceReference &, ePtr &ptr); }; -class eServiceDVD: public iPlayableService, public iPauseableService, public iSeekableService, +class eServiceDVD: public iPlayableService, public iPauseableService, public iSeekableService, public iAudioTrackSelection, public iServiceInformation, public iSubtitleOutput, public iServiceKeys, public iCueSheet, public eThread, public Object { friend class eServiceFactoryDVD; @@ -35,7 +35,7 @@ public: virtual ~eServiceDVD(); // not implemented (yet) RESULT audioChannel(ePtr &ptr) { ptr = 0; return -1; } - RESULT audioTracks(ePtr &ptr) { ptr = 0; return -1; } + RESULT audioTracks(ePtr &ptr); RESULT frontendInfo(ePtr &ptr) { ptr = 0; return -1; } RESULT subServices(ePtr &ptr) { ptr = 0; return -1; } RESULT timeshift(ePtr &ptr) { ptr = 0; return -1; } @@ -89,8 +89,15 @@ public: void setCutList(SWIG_PYOBJECT(ePyObject)); void setCutListEnable(int enable); - // iServiceKeys + // iAudioTrackSelection + int getNumberOfTracks(); + RESULT selectTrack(unsigned int i); + RESULT getTrackInfo(struct iAudioTrackInfo &, unsigned int n); + int getCurrentTrack(); + + // iServiceKeys RESULT keyPressed(int key); + private: eServiceDVD(eServiceReference ref); -- cgit v1.2.3 From 6b2d6f1d24af4d81fda1e9ebc4d11a5df3e8110a Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 27 Jan 2011 17:04:02 +0100 Subject: experimentally enable AudioSelection Dialog for DVDPlayer (#440) --- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index e1ab3ef4..259e52b8 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -4,7 +4,7 @@ from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.HelpMenu import HelpableScreen -from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarShowHide, InfoBarNotifications +from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarShowHide, InfoBarNotifications, InfoBarAudioSelection, InfoBarSubtitleSupport from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap from Components.Label import Label from Components.Sources.StaticText import StaticText @@ -195,7 +195,7 @@ class ChapterZap(Screen): self.Timer.callback.append(self.keyOK) self.Timer.start(3000, True) -class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarPVRState, InfoBarShowHide, HelpableScreen, InfoBarCueSheetSupport): +class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarPVRState, InfoBarShowHide, HelpableScreen, InfoBarCueSheetSupport, InfoBarAudioSelection, InfoBarSubtitleSupport): ALLOW_SUSPEND = Screen.SUSPEND_PAUSES ENABLE_RESUME_SUPPORT = True @@ -275,6 +275,8 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP InfoBarNotifications.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap = "MediaPlayerCueSheetActions") InfoBarShowHide.__init__(self) + InfoBarAudioSelection.__init__(self) + InfoBarSubtitleSupport.__init__(self) HelpableScreen.__init__(self) self.save_infobar_seek_config() self.change_infobar_seek_config() @@ -553,7 +555,8 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.sendKey(iServiceKeys.keyUser+1) def enterDVDAudioMenu(self): - self.sendKey(iServiceKeys.keyUser+2) + self.audioSelection() + #self.sendKey(iServiceKeys.keyUser+2) def nextChapter(self): self.sendKey(iServiceKeys.keyUser+3) -- cgit v1.2.3 From ca7333ab52acb1fd4cb19dc2b2817507a8ae9d75 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Fri, 28 Jan 2011 10:59:51 +0100 Subject: DVDPlayer subtitle stream selection through enigma2 AudioSelection dialog (#441) --- .../Extensions/DVDPlayer/src/servicedvd.cpp | 34 ++++++++++++++++------ lib/python/Screens/AudioSelection.py | 4 +-- 2 files changed, 27 insertions(+), 11 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index da9c0bb7..b960ed67 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -407,7 +407,6 @@ int eServiceDVD::getNumberOfTracks() { int i = 0; ddvd_get_audio_count(m_ddvdconfig, &i); - eDebug("getNumberOfTracks returns %i", i); return i; } @@ -416,14 +415,12 @@ int eServiceDVD::getCurrentTrack() int audio_id,audio_type; uint16_t audio_lang; ddvd_get_last_audio(m_ddvdconfig, &audio_id, &audio_lang, &audio_type); - eDebug("getCurrentTrack returns %i", audio_id); return audio_id; } RESULT eServiceDVD::selectTrack(unsigned int i) { ddvd_set_audio(m_ddvdconfig, i); - eDebug("selectTrack %i", i); return 0; } @@ -681,14 +678,32 @@ PyObject *eServiceDVD::getInfoObject(int w) Py_RETURN_NONE; } -RESULT eServiceDVD::enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) /*entry*/) +RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) { delete m_subtitle_widget; + eSize size = eSize(720, 576); m_subtitle_widget = new eSubtitleWidget(parent); m_subtitle_widget->resize(parent->size()); - - eSize size = eSize(720, 576); + + int pid = -1; + + if ( tuple != Py_None ) + { + ePyObject entry; + int tuplesize = PyTuple_Size(tuple); + if (!PyTuple_Check(tuple)) + goto error_out; + if (tuplesize < 1) + goto error_out; + entry = PyTuple_GET_ITEM(tuple, 1); + if (!PyInt_Check(entry)) + goto error_out; + pid = PyInt_AsLong(entry)-1; + + ddvd_set_spu(m_ddvdconfig, pid); + } + eDebug("eServiceDVD::enableSubtitles %i", pid); if (!m_pixmap) { @@ -706,6 +721,9 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) /* m_subtitle_widget->show(); return 0; + +error_out: + return -1; } RESULT eServiceDVD::disableSubtitles(eWidget */*parent*/) @@ -717,8 +735,6 @@ RESULT eServiceDVD::disableSubtitles(eWidget */*parent*/) PyObject *eServiceDVD::getSubtitleList() { - eDebug("eServiceMP3::getSubtitleList"); - ePyObject l = PyList_New(0); unsigned int spu_count = 0; ddvd_get_spu_count(m_ddvdconfig, &spu_count); @@ -731,7 +747,7 @@ PyObject *eServiceDVD::getSubtitleList() ePyObject tuple = PyTuple_New(5); PyTuple_SetItem(tuple, 0, PyInt_FromLong(2)); - PyTuple_SetItem(tuple, 1, PyInt_FromLong(0)); + PyTuple_SetItem(tuple, 1, PyInt_FromLong(spu_id+1)); PyTuple_SetItem(tuple, 2, PyInt_FromLong(3)); PyTuple_SetItem(tuple, 3, PyInt_FromLong(0)); PyTuple_SetItem(tuple, 4, PyString_FromString(spu_string)); diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py index 576fd381..b3b82b46 100644 --- a/lib/python/Screens/AudioSelection.py +++ b/lib/python/Screens/AudioSelection.py @@ -84,7 +84,7 @@ class AudioSelection(Screen, ConfigListScreen): conflist.append(getConfigListEntry(_("Channel"), self.settings.channelmode)) self["key_green"].setBoolean(True) else: - conflist.append(getConfigListEntry("", ConfigNothing())) + conflist.append(('',)) self["key_green"].setBoolean(False) selectedAudio = self.audioTracks.getCurrentTrack() for x in range(n): @@ -141,7 +141,7 @@ class AudioSelection(Screen, ConfigListScreen): language = _("") selected = "" - if sel and x[:4] == sel[:4]: + if sel and x == sel: selected = _("Running") selectedidx = idx -- cgit v1.2.3 From f3060d26bbb98713b901794b6e47bf7f064a9073 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Fri, 28 Jan 2011 11:29:51 +0100 Subject: DVDPlayer: AudioSelection integration (#441) --- lib/python/Plugins/Extensions/DVDPlayer/keymap.xml | 3 ++- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 7 +++++-- lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml b/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml index 7b7f2054..bf57e753 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml +++ b/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml @@ -8,7 +8,8 @@ - + + diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 259e52b8..d14a6238 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -356,6 +356,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP "prevTitle": (self.prevTitle, _("jump back to the previous title")), "tv": (self.askLeavePlayer, _("exit DVD player or return to file browser")), "dvdAudioMenu": (self.enterDVDAudioMenu, _("(show optional DVD audio menu)")), + "AudioSelection": (self.enterAudioSelection, _("Select audio track")), "nextAudioTrack": (self.nextAudioTrack, _("switch to the next audio track")), "nextSubtitleTrack": (self.nextSubtitleTrack, _("switch to the next subtitle language")), "nextAngle": (self.nextAngle, _("switch to the next angle")), @@ -548,6 +549,9 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP keys.keyPressed(key) return keys + def enterAudioSelection(self): + self.audioSelection() + def nextAudioTrack(self): self.sendKey(iServiceKeys.keyUser) @@ -555,8 +559,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.sendKey(iServiceKeys.keyUser+1) def enterDVDAudioMenu(self): - self.audioSelection() - #self.sendKey(iServiceKeys.keyUser+2) + self.sendKey(iServiceKeys.keyUser+2) def nextChapter(self): self.sendKey(iServiceKeys.keyUser+3) diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index b960ed67..ccacf3c0 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -685,7 +685,7 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) m_subtitle_widget = new eSubtitleWidget(parent); m_subtitle_widget->resize(parent->size()); - + int pid = -1; if ( tuple != Py_None ) @@ -702,6 +702,7 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) pid = PyInt_AsLong(entry)-1; ddvd_set_spu(m_ddvdconfig, pid); + m_event(this, evUser+7); } eDebug("eServiceDVD::enableSubtitles %i", pid); -- cgit v1.2.3 From 367c104e1d3716861c87905575d0bc729342d79c Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 7 Feb 2011 14:15:40 +0100 Subject: PluginSystem: implement new PluginDescriptor option "needsRestart" to define if a plugin needs an enigma2 restart after installation. Now new installed plugins are only direct accessible after installation if needsRestart=False is defined inside the plugins PluginDescriptor. fixes #670 --- lib/python/Components/PluginComponent.py | 34 ++++++++++++++++++++++++++------ lib/python/Plugins/Plugin.py | 3 ++- 2 files changed, 30 insertions(+), 7 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 5e439fdf..60f76738 100755 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -8,6 +8,9 @@ from Plugins.Plugin import PluginDescriptor import keymapparser class PluginComponent: + firstRun = True + restartRequired = False + def __init__(self): self.plugins = {} self.pluginList = [ ] @@ -18,12 +21,22 @@ class PluginComponent: self.prefix = prefix def addPlugin(self, plugin): - self.pluginList.append(plugin) - for x in plugin.where: - self.plugins.setdefault(x, []).append(plugin) - if x == PluginDescriptor.WHERE_AUTOSTART: - plugin(reason=0) - + if self.firstRun: + self.pluginList.append(plugin) + for x in plugin.where: + self.plugins.setdefault(x, []).append(plugin) + if x == PluginDescriptor.WHERE_AUTOSTART: + plugin(reason=0) + else: + if plugin.needsRestart is False: + self.pluginList.append(plugin) + for x in plugin.where: + self.plugins.setdefault(x, []).append(plugin) + if x == PluginDescriptor.WHERE_AUTOSTART: + plugin(reason=0) + else: + self.restartRequired = True + def removePlugin(self, plugin): self.pluginList.remove(plugin) for x in plugin.where: @@ -81,12 +94,21 @@ class PluginComponent: # internally, the "fnc" argument will be compared with __eq__ plugins_added = [p for p in new_plugins if p not in self.pluginList] plugins_removed = [p for p in self.pluginList if not p.internal and p not in new_plugins] + + #ignore already installed but reloaded plugins + for p in plugins_removed: + for pa in plugins_added: + if pa.name == p.name and pa.where == p.where: + pa.needsRestart = False for p in plugins_removed: self.removePlugin(p) for p in plugins_added: self.addPlugin(p) + + if self.firstRun: + self.firstRun = False def getPlugins(self, where): """Get list of plugins in a specific category""" diff --git a/lib/python/Plugins/Plugin.py b/lib/python/Plugins/Plugin.py index 5a676cda..9ecdbc26 100755 --- a/lib/python/Plugins/Plugin.py +++ b/lib/python/Plugins/Plugin.py @@ -61,9 +61,10 @@ class PluginDescriptor: WHERE_SOFTWAREMANAGER = 14 - def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None, wakeupfnc = None, internal = False): + def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None, wakeupfnc = None, needsRestart = None, internal = False): self.name = name self.internal = internal + self.needsRestart = needsRestart if isinstance(where, list): self.where = where else: -- cgit v1.2.3 From 89e103f1ff262950613b761fcb370f8ab7267ee8 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 7 Feb 2011 14:34:11 +0100 Subject: SoftwareManager: ask for restart after installation inside pluginmanager only if a restart is required. refs #670 --- .../SystemPlugins/SoftwareManager/SoftwareTools.py | 4 +- .../SystemPlugins/SoftwareManager/plugin.py | 47 +++++++++++----------- 2 files changed, 26 insertions(+), 25 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py index 8b8fc97c..87f0a4d6 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py @@ -264,13 +264,12 @@ class SoftwareTools(DreamInfoHandler): callback(False) def startIpkgListInstalled(self, callback = None): - print "STARTIPKGLISTINSTALLED" if callback is not None: self.list_updating = True if self.list_updating: if not self.UpdateConsole: self.UpdateConsole = Console() - cmd = "opkg list_installed" + cmd = "opkg list-installed" self.UpdateConsole.ePopen(cmd, self.IpkgListInstalledCB, callback) def IpkgListInstalledCB(self, result, retval, extra_args = None): @@ -344,6 +343,7 @@ class SoftwareTools(DreamInfoHandler): callback = None def cleanupSoftwareTools(self): + self.list_updating = False if self.NotifierCallback is not None: self.NotifierCallback = None self.ipkg.stop() diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index 480707d0..4ee9b498 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -809,6 +809,8 @@ class PluginManager(Screen, DreamInfoHandler): name = x[0].strip() details = x[1].strip() description = x[2].strip() + if description == "": + description = "No description available." packagename = x[3].strip() selectState = self.getSelectionState(details) if iSoftwareTools.installed_packetlist.has_key(packagename): @@ -921,17 +923,20 @@ class PluginManager(Screen, DreamInfoHandler): self.close() def runExecuteFinished(self): - self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO) - - def ExecuteReboot(self, result): - if result is None: - return - if result is False: - self.reloadPluginlist() + self.reloadPluginlist() + restartRequired = plugins.restartRequired + if restartRequired: + self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO) + else: self.selectedFiles = [] self.detailsClosed(True) + + def ExecuteReboot(self, result): if result: quitMainloop(3) + else: + self.selectedFiles = [] + self.detailsClosed(True) def reloadPluginlist(self): plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) @@ -1287,30 +1292,24 @@ class PluginDetails(Screen, DreamInfoHandler): self.session.openWithCallback(self.runUpgradeFinished, Ipkg, cmdList = self.cmdList) def runUpgradeFinished(self): - self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO) - - def UpgradeReboot(self, result): - if result is None: - return - if result is False: + self.reloadPluginlist() + restartRequired = plugins.restartRequired + if restartRequired: + self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO) + else: self.close(True) + def UpgradeReboot(self, result): if result: quitMainloop(3) + else: + self.close(True) def runRemove(self, result): if result: self.session.openWithCallback(self.runRemoveFinished, Ipkg, cmdList = self.cmdList) def runRemoveFinished(self): - self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO) - - def RemoveReboot(self, result): - if result is None: - return - if result is False: - self.close(True) - if result: - quitMainloop(3) + self.close(True) def reloadPluginlist(self): plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) @@ -1884,7 +1883,7 @@ class PacketManager(Screen, NumericalTextInput): if not self.Console: self.Console = Console() - cmd = "opkg list_installed" + cmd = "opkg list-installed" self.Console.ePopen(cmd, self.IpkgListInstalled_Finished) def IpkgListInstalled_Finished(self, result, retval, extra_args = None): @@ -1916,6 +1915,8 @@ class PacketManager(Screen, NumericalTextInput): def buildEntryComponent(self, name, version, description, state): divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + if description == "": + description = "No description available." if state == 'installed': installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) return((name, version, _(description), state, installedpng, divpng)) -- cgit v1.2.3 From 65a7c0d34bf86543475e98a781a93aa59013b6ce Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 7 Feb 2011 20:47:31 +0100 Subject: Enigma2-Plugins: implement needsRestart=False for plugins that don't need a enigma2 restart after installation. refs #670 --- lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py | 4 ++-- lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py | 2 +- lib/python/Plugins/Extensions/CutListEditor/plugin.py | 2 +- lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py | 4 ++-- lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 4 ++-- lib/python/Plugins/Extensions/PicturePlayer/plugin.py | 4 ++-- lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py | 4 ++-- .../SystemPlugins/CommonInterfaceAssignment/plugin.py | 12 ++++++------ .../Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py | 4 ++-- .../Plugins/SystemPlugins/DefaultServicesScanner/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py | 4 ++-- lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py | 3 ++- lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py | 2 +- .../SystemPlugins/SatelliteEquipmentControl/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/Satfinder/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py | 6 +++--- lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/VideoTune/plugin.py | 4 ++-- lib/python/Plugins/SystemPlugins/Videomode/plugin.py | 4 ++-- lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py | 2 +- 23 files changed, 40 insertions(+), 39 deletions(-) mode change 100644 => 100755 lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py mode change 100644 => 100755 lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/CutListEditor/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/Satfinder/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/VideoTune/plugin.py (limited to 'lib/python') diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py b/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py old mode 100644 new mode 100755 index 2c078d35..dcaa1f65 --- a/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py @@ -82,6 +82,6 @@ def main(session, **kwargs): # would start your plugin here def Plugins(**kwargs): - return [PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = main), - PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), icon = "plugin.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc = main)] + return [PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), where = PluginDescriptor.WHERE_EXTENSIONSMENU, needsRestart = False, fnc = main), + PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), icon = "plugin.png", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc = main)] \ No newline at end of file diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py old mode 100644 new mode 100755 index 69f935e4..4ef4a87d --- a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py @@ -80,4 +80,4 @@ def test(returnValue): print "You entered", returnValue def Plugins(**kwargs): - return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) + return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main) diff --git a/lib/python/Plugins/Extensions/CutListEditor/plugin.py b/lib/python/Plugins/Extensions/CutListEditor/plugin.py old mode 100644 new mode 100755 index 0627df3b..141c04ac --- a/lib/python/Plugins/Extensions/CutListEditor/plugin.py +++ b/lib/python/Plugins/Extensions/CutListEditor/plugin.py @@ -406,4 +406,4 @@ def main(session, service, **kwargs): session.open(CutListEditor, service) def Plugins(**kwargs): - return PluginDescriptor(name="Cutlist Editor", description=_("Cutlist editor..."), where = PluginDescriptor.WHERE_MOVIELIST, fnc=main) + return PluginDescriptor(name="Cutlist Editor", description=_("Cutlist editor..."), where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = False, fnc=main) diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py old mode 100644 new mode 100755 index adb7015d..bcc7b9b2 --- a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py @@ -94,5 +94,5 @@ def main(session, servicelist, **kwargs): def Plugins(**kwargs): name = _("Graphical Multi EPG") descr = _("A graphical EPG for all services of an specific bouquet") - return [ PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EVENTINFO, fnc=main), - PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main) ] + return [PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EVENTINFO, needsRestart = False, fnc=main), + PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EXTENSIONSMENU, needsRestart = False, fnc=main)] diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 9ae886fc..b44a2470 100755 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -1041,6 +1041,6 @@ def filescan(**kwargs): from Plugins.Plugin import PluginDescriptor def Plugins(**kwargs): return [ - PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, fnc = menu), - PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan) + PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = menu), + PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan) ] diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py index 5d1c2cba..169a8c8a 100755 --- a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py +++ b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py @@ -625,5 +625,5 @@ def filescan(**kwargs): def Plugins(**kwargs): return \ - [PluginDescriptor(name=_("PicturePlayer"), description=_("fileformats (BMP, PNG, JPG, GIF)"), icon="pictureplayer.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), - PluginDescriptor(name=_("PicturePlayer"), where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] + [PluginDescriptor(name=_("PicturePlayer"), description=_("fileformats (BMP, PNG, JPG, GIF)"), icon="pictureplayer.png", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main), + PluginDescriptor(name=_("PicturePlayer"), where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)] diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py b/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py index f8677bb2..157aa759 100755 --- a/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py @@ -126,10 +126,10 @@ def selSetup(menuid, **kwargs): def Plugins(**kwargs): list = [] - list.append(PluginDescriptor(name=_("CleanupWizard"), description=_("Cleanup Wizard settings"),where=PluginDescriptor.WHERE_MENU, fnc=selSetup)) + list.append(PluginDescriptor(name=_("CleanupWizard"), description=_("Cleanup Wizard settings"),where=PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=selSetup)) if config.plugins.cleanupwizard.enable.value: if not config.misc.firstrun.value: if internalMemoryExceeded: - list.append(PluginDescriptor(name=_("Cleanup Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, CleanupWizard))) + list.append(PluginDescriptor(name=_("Cleanup Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(1, CleanupWizard))) return list diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py index 52296c66..b3454283 100755 --- a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py +++ b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py @@ -636,10 +636,10 @@ def menu(menuid, **kwargs): def Plugins(**kwargs): if config.usage.setup_level.index > 1: - return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart ), - PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart ), - PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers/caids to common interface modules"), where = PluginDescriptor.WHERE_MENU, fnc = menu )] + return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = False, fnc = sessionstart ), + PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = False, fnc = autostart ), + PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers/caids to common interface modules"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = menu )] else: - return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart ), - PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart ), - PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers to common interface modules"), where = PluginDescriptor.WHERE_MENU, fnc = menu )] + return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = False, fnc = sessionstart ), + PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = False, fnc = autostart ), + PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers to common interface modules"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = menu )] diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py index 92c16289..ab74de43 100755 --- a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py @@ -421,6 +421,6 @@ def selSetup(menuid, **kwargs): def Plugins(**kwargs): - return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart), - PluginDescriptor(name=_("CrashlogAutoSubmit"), description=_("CrashlogAutoSubmit settings"),where=PluginDescriptor.WHERE_MENU, fnc=selSetup)] + return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], needsRestart = False, fnc = autostart), + PluginDescriptor(name=_("CrashlogAutoSubmit"), description=_("CrashlogAutoSubmit settings"),where=PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=selSetup)] diff --git a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py old mode 100644 new mode 100755 index 4d0a992d..d26881ed --- a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py +++ b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py @@ -134,4 +134,4 @@ def DefaultServicesScannerMain(session, **kwargs): session.open(DefaultServicesScannerPlugin) def Plugins(**kwargs): - return PluginDescriptor(name="Default Services Scanner", description=_("Scans default lamedbs sorted by satellite with a connected dish positioner"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=DefaultServicesScannerMain) + return PluginDescriptor(name="Default Services Scanner", description=_("Scans default lamedbs sorted by satellite with a connected dish positioner"), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=DefaultServicesScannerMain) diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py b/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py index 5b7edcf6..4dcf6c6b 100755 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py @@ -679,5 +679,5 @@ def autostart(reason, **kwargs): resourcemanager.addResource("DiseqcTester", DiseqcTesterMain) def Plugins(**kwargs): - return [ PluginDescriptor(name="DiSEqC Tester", description=_("Test DiSEqC settings"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=DiseqcTesterMain), - PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)] + return [ PluginDescriptor(name="DiSEqC Tester", description=_("Test DiSEqC settings"), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=DiseqcTesterMain), + PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = False, fnc = autostart)] diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py index 1eba1dd4..b6544764 100755 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py @@ -20,6 +20,7 @@ def Plugins(**kwargs): description=_("Download .NFI-Files for USB-Flasher"), icon = "flash.png", where = PluginDescriptor.WHERE_SOFTWAREMANAGER, + needsRestart = False, fnc={"SoftwareSupported": NFICallFnc, "menuEntryName": lambda x: _("NFI Image Flashing"), "menuEntryDescription": lambda x: _("Download .NFI-Files for USB-Flasher")}), - PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] + PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)] diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py b/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py index 49ec7da8..56cebdbf 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py @@ -18,5 +18,5 @@ def NetworkWizard(*args, **kwargs): def Plugins(**kwargs): list = [] if config.misc.firstrun.value: - list.append(PluginDescriptor(name=_("Network Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(25, NetworkWizard))) + list.append(PluginDescriptor(name=_("Network Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(25, NetworkWizard))) return list diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py old mode 100644 new mode 100755 index 3cc9e751..be246db2 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -608,6 +608,6 @@ def PositionerSetupStart(menuid, **kwargs): def Plugins(**kwargs): if (nimmanager.hasNimType("DVB-S")): - return PluginDescriptor(name=_("Positioner setup"), description="Setup your positioner", where = PluginDescriptor.WHERE_MENU, fnc=PositionerSetupStart) + return PluginDescriptor(name=_("Positioner setup"), description="Setup your positioner", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=PositionerSetupStart) else: return [] diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py old mode 100644 new mode 100755 index ec472e72..3a8c75c0 --- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py @@ -71,6 +71,6 @@ def SecSetupStart(menuid): def Plugins(**kwargs): if (nimmgr.hasNimType("DVB-S")): - return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_MENU, fnc=SecSetupStart) + return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SecSetupStart) else: return [] diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py old mode 100644 new mode 100755 index d4fe6b58..e737466a --- a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py @@ -276,6 +276,6 @@ def SatfinderStart(menuid, **kwargs): def Plugins(**kwargs): if (nimmanager.hasNimType("DVB-S")): - return PluginDescriptor(name=_("Satfinder"), description="Helps setting up your dish", where = PluginDescriptor.WHERE_MENU, fnc=SatfinderStart) + return PluginDescriptor(name=_("Satfinder"), description="Helps setting up your dish", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SatfinderStart) else: return [] diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py b/lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py index 30cbb6b6..fd2b5e1f 100755 --- a/lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py @@ -131,4 +131,4 @@ def SkinSelSetup(menuid, **kwargs): return [] def Plugins(**kwargs): - return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_MENU, fnc=SkinSelSetup) + return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SkinSelSetup) diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index 4ee9b498..b3a0a17a 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -2033,9 +2033,9 @@ def Plugins(path, **kwargs): global plugin_path plugin_path = path list = [ - PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup), - PluginDescriptor(name=_("Ipkg"), where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan) + PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup), + PluginDescriptor(name=_("Ipkg"), where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan) ] if config.usage.setup_level.index >= 2: # expert+ - list.append(PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=UpgradeMain)) + list.append(PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, needsRestart = False, fnc=UpgradeMain)) return list diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py index 42fe82da..48f871f9 100755 --- a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py +++ b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py @@ -166,5 +166,5 @@ def startMenu(menuid): return [(_("Temperature and Fan control"), main, "tempfancontrol", 80)] def Plugins(**kwargs): - return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, fnc = startMenu) + return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = startMenu) diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py b/lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py index 7953d383..cde3930e 100755 --- a/lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py @@ -394,5 +394,5 @@ def startSetup(menuid): def Plugins(**kwargs): list = [] if config.usage.setup_level.index >= 2 and os_path.exists("/proc/stb/vmpeg/0/pep_apply"): - list.append(PluginDescriptor(name=_("Videoenhancement Setup"), description=_("Advanced Video Enhancement Setup"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup)) + list.append(PluginDescriptor(name=_("Videoenhancement Setup"), description=_("Advanced Video Enhancement Setup"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup)) return list diff --git a/lib/python/Plugins/SystemPlugins/VideoTune/plugin.py b/lib/python/Plugins/SystemPlugins/VideoTune/plugin.py old mode 100644 new mode 100755 index 1b62206f..9e90c72e --- a/lib/python/Plugins/SystemPlugins/VideoTune/plugin.py +++ b/lib/python/Plugins/SystemPlugins/VideoTune/plugin.py @@ -34,6 +34,6 @@ def startSetup(menuid): def Plugins(**kwargs): return [ - PluginDescriptor(name=_("Video Fine-Tuning"), description=_("fine-tune your display"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup), - PluginDescriptor(name=_("Video Fine-Tuning Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, videoFinetuneWizard)) + PluginDescriptor(name=_("Video Fine-Tuning"), description=_("fine-tune your display"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup), + PluginDescriptor(name=_("Video Fine-Tuning Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(1, videoFinetuneWizard)) ] diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py index 39c1131a..7396534f 100755 --- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py @@ -227,8 +227,8 @@ def VideoWizard(*args, **kwargs): def Plugins(**kwargs): list = [ # PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart), - PluginDescriptor(name=_("Video Setup"), description=_("Advanced Video Setup"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) + PluginDescriptor(name=_("Video Setup"), description=_("Advanced Video Setup"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup) ] if config.misc.videowizardenabled.value: - list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(0, VideoWizard))) + list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(0, VideoWizard))) return list diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py index a13c7975..adf47f0f 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py @@ -463,4 +463,4 @@ def configStrings(iface): return ' pre-up iwconfig '+iface+' essid "'+config.plugins.wlan.essid.value+'"\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -D'+driver+'\n post-down wpa_cli terminate' def Plugins(**kwargs): - return PluginDescriptor(name=_("Wireless LAN"), description=_("Connect to a Wireless Network"), where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": callFunction, "configStrings": configStrings, "WlanPluginEntry": lambda x: "Wireless Network Configuartion..."}) + return PluginDescriptor(name=_("Wireless LAN"), description=_("Connect to a Wireless Network"), where = PluginDescriptor.WHERE_NETWORKSETUP, needsRestart = False, fnc={"ifaceSupported": callFunction, "configStrings": configStrings, "WlanPluginEntry": lambda x: "Wireless Network Configuartion..."}) -- cgit v1.2.3 From 81ed3b8706eb034f04e9db87fbcfd9dbba39e125 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 7 Feb 2011 21:52:19 +0100 Subject: Enigma2-Plugins: implement needsRestart=True for plugins that need a enigma2 restart after installation. refs #670 --- lib/python/Plugins/Extensions/DVDBurn/plugin.py | 4 ++-- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 4 ++-- lib/python/Plugins/Extensions/MediaScanner/plugin.py | 6 +++--- lib/python/Plugins/Extensions/Modem/plugin.py | 2 +- lib/python/Plugins/Extensions/SocketMMI/plugin.py | 7 ++++--- lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py | 2 +- lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py | 4 ++-- lib/python/Plugins/SystemPlugins/Hotplug/plugin.py | 2 +- 8 files changed, 16 insertions(+), 15 deletions(-) mode change 100644 => 100755 lib/python/Plugins/Extensions/DVDBurn/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/Modem/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/SocketMMI/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py mode change 100644 => 100755 lib/python/Plugins/SystemPlugins/Hotplug/plugin.py (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDBurn/plugin.py b/lib/python/Plugins/Extensions/DVDBurn/plugin.py old mode 100644 new mode 100755 index bd856b47..f5d2fa62 --- a/lib/python/Plugins/Extensions/DVDBurn/plugin.py +++ b/lib/python/Plugins/Extensions/DVDBurn/plugin.py @@ -13,5 +13,5 @@ def main_add(session, service, **kwargs): def Plugins(**kwargs): 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") ] + return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = True, fnc=main_add, icon="dvdburn.png"), + PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main, icon="dvdburn.png") ] diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index e1ab3ef4..eaf8db64 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -775,5 +775,5 @@ def filescan(**kwargs): )] def Plugins(**kwargs): - return [PluginDescriptor(name = "DVDPlayer", description = "Play DVDs", where = PluginDescriptor.WHERE_MENU, fnc = menu), - PluginDescriptor(where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] + return [PluginDescriptor(name = "DVDPlayer", description = "Play DVDs", where = PluginDescriptor.WHERE_MENU, needsRestart = True, fnc = menu), + PluginDescriptor(where = PluginDescriptor.WHERE_FILESCAN, needsRestart = True, fnc = filescan)] diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py index 0cefa353..76bbb26a 100755 --- a/lib/python/Plugins/Extensions/MediaScanner/plugin.py +++ b/lib/python/Plugins/Extensions/MediaScanner/plugin.py @@ -91,8 +91,8 @@ 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, needsRestart = True, fnc=main), # PluginDescriptor(where = PluginDescriptor.WHERE_MENU, fnc=menuHook), - PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart), - PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) + PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = True, fnc = sessionstart), + PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart) ] diff --git a/lib/python/Plugins/Extensions/Modem/plugin.py b/lib/python/Plugins/Extensions/Modem/plugin.py old mode 100644 new mode 100755 index e57e4f51..0b397c18 --- a/lib/python/Plugins/Extensions/Modem/plugin.py +++ b/lib/python/Plugins/Extensions/Modem/plugin.py @@ -280,4 +280,4 @@ def main(session, **kwargs): session.open(ModemSetup) def Plugins(**kwargs): - return PluginDescriptor(name="Modem", description="plugin to connect to internet via builtin modem", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) + return PluginDescriptor(name="Modem", description="plugin to connect to internet via builtin modem", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main) diff --git a/lib/python/Plugins/Extensions/SocketMMI/plugin.py b/lib/python/Plugins/Extensions/SocketMMI/plugin.py old mode 100644 new mode 100755 index 387c8306..568cde2a --- a/lib/python/Plugins/Extensions/SocketMMI/plugin.py +++ b/lib/python/Plugins/Extensions/SocketMMI/plugin.py @@ -22,6 +22,7 @@ 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), - PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart), - PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) ] + return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, needsRestart = True, fnc = menu), + PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = True, fnc = sessionstart), + PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart) ] + diff --git a/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py b/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py old mode 100644 new mode 100755 index 05085ead..e124ffd2 --- a/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py +++ b/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py @@ -17,7 +17,7 @@ def getPlugins(): for x in dir: if x[-3:] == "cfg": params = getPluginParams(x) - pluginlist.append(PluginDescriptor(name=params["name"], description=params["desc"], where = PluginDescriptor.WHERE_PLUGINMENU, icon="tuxbox.png", fnc=boundFunction(main, plugin=x))) + pluginlist.append(PluginDescriptor(name=params["name"], description=params["desc"], where = PluginDescriptor.WHERE_PLUGINMENU, icon="tuxbox.png", needsRestart = True, fnc=boundFunction(main, plugin=x))) return pluginlist diff --git a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py old mode 100644 new mode 100755 index 38b80c95..6cb30de2 --- a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py +++ b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py @@ -76,11 +76,11 @@ def Plugins(**kwargs): newversion = getUpgradeVersion() or 0 list = [] if version is not None and version < newversion: - list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, fnc=(8, FPUpgrade))) + list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(8, FPUpgrade))) try: msg = open("/proc/stb/message").read() - list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, fnc=(9, SystemMessage, msg))) + list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(9, SystemMessage, msg))) except: pass diff --git a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py old mode 100644 new mode 100755 index 1f379f10..84cbbcb6 --- a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py @@ -297,4 +297,4 @@ def autostart(reason, **kwargs): reactor.listenUNIX("/tmp/hotplug.socket", factory) def Plugins(**kwargs): - return PluginDescriptor(name = "Hotplug", description = "listens to hotplug events", where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) + return PluginDescriptor(name = "Hotplug", description = "listens to hotplug events", where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart) -- cgit v1.2.3 From 6a3f59e24b003c417fbf6b31f8a6d87817fec24c Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 7 Feb 2011 21:54:11 +0100 Subject: PluginComponent.py: small cleanup --- lib/python/Components/PluginComponent.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 60f76738..0e178fff 100755 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -21,21 +21,14 @@ class PluginComponent: self.prefix = prefix def addPlugin(self, plugin): - if self.firstRun: + if self.firstRun or plugin.needsRestart is False: self.pluginList.append(plugin) for x in plugin.where: self.plugins.setdefault(x, []).append(plugin) if x == PluginDescriptor.WHERE_AUTOSTART: plugin(reason=0) else: - if plugin.needsRestart is False: - self.pluginList.append(plugin) - for x in plugin.where: - self.plugins.setdefault(x, []).append(plugin) - if x == PluginDescriptor.WHERE_AUTOSTART: - plugin(reason=0) - else: - self.restartRequired = True + self.restartRequired = True def removePlugin(self, plugin): self.pluginList.remove(plugin) -- cgit v1.2.3 From 03706708fac0d7ac8cf0b63af9e473416f42e1b5 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Tue, 8 Feb 2011 11:31:55 +0100 Subject: Plugins: fix permission of plugin.py --- lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py | 0 lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py | 0 lib/python/Plugins/Extensions/CutListEditor/plugin.py | 0 lib/python/Plugins/Extensions/DVDBurn/plugin.py | 0 lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 0 lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py | 0 lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 0 lib/python/Plugins/Extensions/MediaScanner/plugin.py | 0 lib/python/Plugins/Extensions/Modem/plugin.py | 0 lib/python/Plugins/Extensions/PicturePlayer/plugin.py | 0 lib/python/Plugins/Extensions/SocketMMI/plugin.py | 0 lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py | 0 lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py | 0 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py | 0 lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py | 0 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py | 0 lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py | 0 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py | 0 lib/python/Plugins/SystemPlugins/Hotplug/plugin.py | 0 lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py | 0 lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py | 0 lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py | 0 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py | 0 lib/python/Plugins/SystemPlugins/Satfinder/plugin.py | 0 lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py | 0 lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py | 0 lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py | 0 lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py | 0 lib/python/Plugins/SystemPlugins/VideoTune/plugin.py | 0 lib/python/Plugins/SystemPlugins/Videomode/plugin.py | 0 lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py | 0 31 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py mode change 100755 => 100644 lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/CutListEditor/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/DVDBurn/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/DVDPlayer/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/MediaPlayer/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/MediaScanner/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/Modem/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/PicturePlayer/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/SocketMMI/plugin.py mode change 100755 => 100644 lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/Hotplug/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/Satfinder/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/VideoTune/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/Videomode/plugin.py mode change 100755 => 100644 lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py (limited to 'lib/python') diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py b/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/CutListEditor/plugin.py b/lib/python/Plugins/Extensions/CutListEditor/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/DVDBurn/plugin.py b/lib/python/Plugins/Extensions/DVDBurn/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/Modem/plugin.py b/lib/python/Plugins/Extensions/Modem/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/SocketMMI/plugin.py b/lib/python/Plugins/Extensions/SocketMMI/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py b/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py b/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py b/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py b/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py b/lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py b/lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/VideoTune/plugin.py b/lib/python/Plugins/SystemPlugins/VideoTune/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py old mode 100755 new mode 100644 diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py old mode 100755 new mode 100644 -- cgit v1.2.3 From 1ddbbcc5385554314a1a142d8c2b7919851fe25b Mon Sep 17 00:00:00 2001 From: acid-burn Date: Thu, 17 Feb 2011 12:00:56 +0100 Subject: PluginComponent.py: properly reset all values if clearPluginList is called for example with an language change. refs #670 --- lib/python/Components/PluginComponent.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/python') diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 0e178fff..e5194b28 100755 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -124,6 +124,8 @@ class PluginComponent: def clearPluginList(self): self.pluginList = [] self.plugins = {} + self.firstRun = True + self.restartRequired = False def shutdown(self): for p in self.pluginList[:]: -- cgit v1.2.3 From 11ea70cc0749456ad092a193e5c5bd70c1fac0dc Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 18 Feb 2011 13:21:58 +0100 Subject: Sources/ServiceEvent.py: removed unneeded directoy/marker check in ServiceEvent source so now the bouquet/provider name is visible in OLED/LCD display in servicelist fixes bug #646 --- lib/python/Components/Sources/ServiceEvent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Components/Sources/ServiceEvent.py b/lib/python/Components/Sources/ServiceEvent.py index 93c733bd..8a0a66a1 100644 --- a/lib/python/Components/Sources/ServiceEvent.py +++ b/lib/python/Components/Sources/ServiceEvent.py @@ -25,7 +25,7 @@ class ServiceEvent(Source, object): def newService(self, ref): if not self.service or not ref or self.service != ref: self.service = ref - if not ref or (ref.flags & Ref.flagDirectory) == Ref.flagDirectory or ref.flags & Ref.isMarker: + if not ref: self.changed((self.CHANGED_CLEAR,)) else: self.changed((self.CHANGED_ALL,)) -- cgit v1.2.3 From 42f5a704c8bd14f9bac30b61a76effaededc74e8 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 19 Feb 2011 15:20:42 +0100 Subject: servicedvd.cpp: fix merge error (caused by the vob subtitle bug merge) --- lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index ccacf3c0..a3749ff7 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -901,7 +901,7 @@ PyObject *eServiceDVD::getCutList() ePyObject list = PyList_New(1); ePyObject tuple = PyTuple_New(2); PyTuple_SetItem(tuple, 0, PyLong_FromLongLong(m_cue_pts)); - PyTuple_SetItem(tuple, 1, PyInt_FromLong(3)); + PyTuple_SetItem(tuple, 1, PyInt_FromLong(5)); PyList_SetItem(list, 0, tuple); return list; } -- cgit v1.2.3 From 5542743a96cff0772577e445a93384d07c291b91 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 19 Feb 2011 15:22:06 +0100 Subject: Revert "servicedvd.cpp: fix merge error (caused by the vob subtitle bug merge)" This reverts commit 42f5a704c8bd14f9bac30b61a76effaededc74e8. --- lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index a3749ff7..ccacf3c0 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -901,7 +901,7 @@ PyObject *eServiceDVD::getCutList() ePyObject list = PyList_New(1); ePyObject tuple = PyTuple_New(2); PyTuple_SetItem(tuple, 0, PyLong_FromLongLong(m_cue_pts)); - PyTuple_SetItem(tuple, 1, PyInt_FromLong(5)); + PyTuple_SetItem(tuple, 1, PyInt_FromLong(3)); PyList_SetItem(list, 0, tuple); return list; } -- cgit v1.2.3 From 6d411cf25bf9d283ab220be1d7af72e585af74d2 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 19 Feb 2011 15:22:59 +0100 Subject: fix merge error (caused by the vob subtitle bug merge) --- lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index ccacf3c0..6d1397da 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -749,7 +749,7 @@ PyObject *eServiceDVD::getSubtitleList() ePyObject tuple = PyTuple_New(5); PyTuple_SetItem(tuple, 0, PyInt_FromLong(2)); PyTuple_SetItem(tuple, 1, PyInt_FromLong(spu_id+1)); - PyTuple_SetItem(tuple, 2, PyInt_FromLong(3)); + PyTuple_SetItem(tuple, 2, PyInt_FromLong(5)); PyTuple_SetItem(tuple, 3, PyInt_FromLong(0)); PyTuple_SetItem(tuple, 4, PyString_FromString(spu_string)); PyList_Append(l, tuple); -- cgit v1.2.3 From 81c086725b8f1da181a776f6fa383f991deca7d9 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 19 Feb 2011 16:05:41 +0100 Subject: SleepTimerEdit.py: add missing Sleeptimer ask save --- lib/python/Screens/SleepTimerEdit.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python') diff --git a/lib/python/Screens/SleepTimerEdit.py b/lib/python/Screens/SleepTimerEdit.py index e5e7af4e..61440d41 100644 --- a/lib/python/Screens/SleepTimerEdit.py +++ b/lib/python/Screens/SleepTimerEdit.py @@ -103,6 +103,7 @@ class SleepTimerEdit(Screen): config.SleepTimer.defaulttime.setValue(time) config.SleepTimer.defaulttime.save() config.SleepTimer.action.save() + config.SleepTimer.ask.save() self.session.nav.SleepTimer.setSleepTime(time) self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been activated."), MessageBox.TYPE_INFO) else: -- cgit v1.2.3