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 --- lib/python/Components/UsageConfig.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/python/Components') 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")), -- 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/Components') 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/Components') 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/Components') 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 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/Components') 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 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/Components') 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 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/Components') 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/Components') 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