aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components')
-rwxr-xr-xlib/python/Components/FileList.py3
-rwxr-xr-xlib/python/Components/PluginComponent.py29
-rw-r--r--lib/python/Components/Sources/ServiceEvent.py2
-rw-r--r--lib/python/Components/TimerSanityCheck.py3
-rw-r--r--lib/python/Components/UsageConfig.py4
5 files changed, 29 insertions, 12 deletions
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/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py
index 5e439fdf..e5194b28 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,15 @@ 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 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:
+ self.restartRequired = True
+
def removePlugin(self, plugin):
self.pluginList.remove(plugin)
for x in plugin.where:
@@ -81,12 +87,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"""
@@ -109,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[:]:
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,))
diff --git a/lib/python/Components/TimerSanityCheck.py b/lib/python/Components/TimerSanityCheck.py
index b472a19e..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):
@@ -107,7 +108,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
diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py
index 8ea9aa6a..a265a169 100644
--- a/lib/python/Components/UsageConfig.py
+++ b/lib/python/Components/UsageConfig.py
@@ -102,13 +102,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")),