aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2011-02-22 18:47:12 +0100
committerAndreas Oberritter <obi@opendreambox.org>2011-02-22 18:47:12 +0100
commit1b1339127ce152097492d899e401e3c6a2438f2c (patch)
tree24b84dbbb8291eabd3b8d6f45dde919bcf249c42 /lib/python/Plugins
parent1f959e3bd0d5642d8b7381268cc4747028c38e9b (diff)
parent1e4c82ee8d55cd1fc22da279eecdfb6a25521eb5 (diff)
downloadenigma2-1b1339127ce152097492d899e401e3c6a2438f2c.tar.gz
enigma2-1b1339127ce152097492d899e401e3c6a2438f2c.zip
Merge branch 'master' into obi/master
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py4
-rw-r--r--lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py2
-rw-r--r--lib/python/Plugins/Extensions/CutListEditor/plugin.py2
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/plugin.py4
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/keymap.xml3
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/Extensions/DVDPlayer/plugin.py22
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp103
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h13
-rw-r--r--lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py4
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/Extensions/MediaPlayer/plugin.py6
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/Extensions/MediaScanner/plugin.py6
-rw-r--r--lib/python/Plugins/Extensions/Modem/plugin.py2
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/Extensions/PicturePlayer/plugin.py4
-rw-r--r--lib/python/Plugins/Extensions/SocketMMI/plugin.py7
-rw-r--r--lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py2
-rwxr-xr-xlib/python/Plugins/Plugin.py3
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py4
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py12
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py4
-rw-r--r--lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py2
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py4
-rw-r--r--lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py4
-rw-r--r--lib/python/Plugins/SystemPlugins/Hotplug/plugin.py2
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py3
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/Satfinder/plugin.py2
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py2
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py4
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py53
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py2
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/VideoTune/plugin.py4
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/Videomode/plugin.py4
-rw-r--r--[-rwxr-xr-x]lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py2
36 files changed, 205 insertions, 98 deletions
diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py b/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py
index 2c078d35..dcaa1f65 100644
--- 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
index 69f935e4..4ef4a87d 100644
--- 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
index 0627df3b..141c04ac 100644
--- 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/DVDBurn/plugin.py b/lib/python/Plugins/Extensions/DVDBurn/plugin.py
index bd856b47..f5d2fa62 100644
--- 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/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 @@
<key id="KEY_PREVIOUS" mapto="prevChapter" flags="m" />
<key id="KEY_NEXT" mapto="nextChapter" flags="m" />
<key id="KEY_TV" mapto="tv" flags="m" />
- <key id="KEY_AUDIO" mapto="dvdAudioMenu" flags="m" />
+ <key id="KEY_AUDIO" mapto="AudioSelection" flags="m" />
+ <key id="KEY_AUDIO" mapto="dvdAudioMenu" flags="l" />
<key id="KEY_RADIO" mapto="nextAudioTrack" flags="m" />
<key id="KEY_TEXT" mapto="nextSubtitleTrack" flags="m" />
<key id="KEY_VIDEO" mapto="nextAngle" flags="m" />
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index e1ab3ef4..1cee0aac 100755..100644
--- 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
@@ -244,8 +244,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
@@ -255,8 +253,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):
@@ -265,8 +261,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):
@@ -275,10 +269,12 @@ 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()
- InfoBarSeek.__init__(self, useSeekBackHack=False)
+ InfoBarSeek.__init__(self)
InfoBarPVRState.__init__(self)
self.dvdScreen = self.session.instantiateDialog(DVDOverlay)
@@ -354,6 +350,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")),
@@ -546,6 +543,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)
@@ -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/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
index 5fbfb0aa..6d1397da 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
+++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
@@ -397,6 +397,61 @@ RESULT eServiceDVD::subtitle(ePtr<iSubtitleOutput> &ptr)
return 0;
}
+RESULT eServiceDVD::audioTracks(ePtr<iAudioTrackSelection> &ptr)
+{
+ ptr = this;
+ return 0;
+}
+
+int eServiceDVD::getNumberOfTracks()
+{
+ int i = 0;
+ ddvd_get_audio_count(m_ddvdconfig, &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);
+ return audio_id;
+}
+
+RESULT eServiceDVD::selectTrack(unsigned int i)
+{
+ ddvd_set_audio(m_ddvdconfig, 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<iServiceKeys> &ptr)
{
ptr=this;
@@ -623,14 +678,33 @@ 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);
+ m_event(this, evUser+7);
+ }
+ eDebug("eServiceDVD::enableSubtitles %i", pid);
if (!m_pixmap)
{
@@ -648,6 +722,9 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) /*
m_subtitle_widget->show();
return 0;
+
+error_out:
+ return -1;
}
RESULT eServiceDVD::disableSubtitles(eWidget */*parent*/)
@@ -659,8 +736,26 @@ RESULT eServiceDVD::disableSubtitles(eWidget */*parent*/)
PyObject *eServiceDVD::getSubtitleList()
{
- eDebug("eServiceDVD::getSubtitleList nyi");
- Py_RETURN_NONE;
+ 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(spu_id+1));
+ 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);
+ 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<iServiceOfflineOperations> &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<iAudioChannelSelection> &ptr) { ptr = 0; return -1; }
- RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr) { ptr = 0; return -1; }
+ RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr);
RESULT frontendInfo(ePtr<iFrontendInformation> &ptr) { ptr = 0; return -1; }
RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; }
RESULT timeshift(ePtr<iTimeshiftService> &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);
diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py
index adb7015d..bcc7b9b2 100644
--- 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..6ff1c5a5 100755..100644
--- 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()
@@ -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/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py
index 0cefa353..76bbb26a 100755..100644
--- 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
index e57e4f51..0b397c18 100644
--- 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/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
index 5d1c2cba..169a8c8a 100755..100644
--- 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/Extensions/SocketMMI/plugin.py b/lib/python/Plugins/Extensions/SocketMMI/plugin.py
index 387c8306..568cde2a 100644
--- 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
index 05085ead..e124ffd2 100644
--- 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/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:
diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py b/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py
index f8677bb2..157aa759 100755..100644
--- 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..100644
--- 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..100644
--- 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
index 4d0a992d..d26881ed 100644
--- 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..100644
--- 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/FrontprocessorUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py
index 38b80c95..6cb30de2 100644
--- 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
index 1f379f10..84cbbcb6 100644
--- 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)
diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py
index 1eba1dd4..b6544764 100755..100644
--- 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..100644
--- 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
index 3cc9e751..be246db2 100644
--- 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
index ec472e72..3a8c75c0 100644
--- 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
index d4fe6b58..e737466a 100644
--- 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..100644
--- 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/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..b3a0a17a 100755..100644
--- 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))
@@ -2032,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..100644
--- 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..100644
--- 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
index 1b62206f..9e90c72e 100644
--- 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..100644
--- 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..100644
--- 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..."})