From: Mladen Horvat Date: Mon, 7 Dec 2009 13:22:39 +0000 (+0100) Subject: Merge commit 'origin/bug_308_add_where_softwaremanager' into experimental X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=28d283c49a8791cc84d70877275f232d5cb526ce;hp=3e4556706ac4c42b68594be8477fb204cd5ff0e9 Merge commit 'origin/bug_308_add_where_softwaremanager' into experimental Conflicts: lib/python/Plugins/Plugin.py --- diff --git a/RecordTimer.py b/RecordTimer.py index 4907f64..f670417 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -2,6 +2,7 @@ from enigma import eEPGCache, getBestPlayableServiceReference, \ eServiceReference, iRecordableService, quitMainloop from Components.config import config +from Components.UsageConfig import defaultMoviePath from Components.TimerSanityCheck import TimerSanityCheck from Screens.MessageBox import MessageBox @@ -141,11 +142,13 @@ class RecordTimerEntry(timer.TimerEntry, object): if config.recording.ascii_filenames.value: filename = ASCIItranslit.legacyEncode(filename) - if self.dirname and not Directories.fileExists(self.dirname, 'w'): - self.dirnameHadToFallback = True - self.Filename = Directories.getRecordingFilename(filename, None) + if not self.dirname or not Directories.fileExists(self.dirname, 'w'): + if self.dirname: + self.dirnameHadToFallback = True + dirname = defaultMoviePath() else: - self.Filename = Directories.getRecordingFilename(filename, self.dirname) + dirname = self.dirname + self.Filename = Directories.getRecordingFilename(filename, dirname) self.log(0, "Filename calculated as: '%s'" % self.Filename) #begin_date + " - " + service_name + description) diff --git a/configure.ac b/configure.ac index 5e403de..1bda10e 100755 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,7 @@ lib/python/Plugins/SystemPlugins/VideoTune/meta/Makefile lib/python/Plugins/SystemPlugins/Videomode/Makefile lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile lib/python/Plugins/SystemPlugins/WirelessLan/Makefile +lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile lib/python/Tools/Makefile lib/service/Makefile lib/components/Makefile diff --git a/data/menu.xml b/data/menu.xml index c7fb889..59195f1 100644 --- a/data/menu.xml +++ b/data/menu.xml @@ -70,7 +70,7 @@ --> - + @@ -104,6 +104,7 @@ self.session.openWithCallback(msgClosed, FactoryReset) 2 3 - 1 + 1 + 1 diff --git a/data/skin_default.xml b/data/skin_default.xml index 16504ab..71f579c 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -43,7 +43,9 @@ - + + + @@ -248,7 +250,7 @@ self.instance.move(ePoint((720-wsizex)/2, (576-wsizey)/(count > 7 and 2 or 3) - + diff --git a/data/skin_default/icons/dish.png b/data/skin_default/icons/dish.png index f3c6548..6148e07 100644 Binary files a/data/skin_default/icons/dish.png and b/data/skin_default/icons/dish.png differ diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 710cc42..ef8dadc 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -1045,9 +1045,9 @@ int eTSMPEGDecoder::setState() int eTSMPEGDecoder::m_pcm_delay=-1, eTSMPEGDecoder::m_ac3_delay=-1; -RESULT eTSMPEGDecoder::setPCMDelay(int delay) +RESULT eTSMPEGDecoder::setHwPCMDelay(int delay) { - if (m_decoder == 0 && delay != m_pcm_delay ) + if (delay != m_pcm_delay ) { FILE *fp = fopen("/proc/stb/audio/audio_delay_pcm", "w"); if (fp) @@ -1061,9 +1061,9 @@ RESULT eTSMPEGDecoder::setPCMDelay(int delay) return -1; } -RESULT eTSMPEGDecoder::setAC3Delay(int delay) +RESULT eTSMPEGDecoder::setHwAC3Delay(int delay) { - if ( m_decoder == 0 && delay != m_ac3_delay ) + if ( delay != m_ac3_delay ) { FILE *fp = fopen("/proc/stb/audio/audio_delay_bitstream", "w"); if (fp) @@ -1077,6 +1077,17 @@ RESULT eTSMPEGDecoder::setAC3Delay(int delay) return -1; } + +RESULT eTSMPEGDecoder::setPCMDelay(int delay) +{ + return m_decoder == 0 ? setHwPCMDelay(delay) : -1; +} + +RESULT eTSMPEGDecoder::setAC3Delay(int delay) +{ + return m_decoder == 0 ? setHwAC3Delay(delay) : -1; +} + eTSMPEGDecoder::eTSMPEGDecoder(eDVBDemux *demux, int decoder) : m_demux(demux), m_vpid(-1), m_vtype(-1), m_apid(-1), m_atype(-1), m_pcrpid(-1), m_textpid(-1), diff --git a/lib/dvb/decoder.h b/lib/dvb/decoder.h index b53638b..3a0fbac 100644 --- a/lib/dvb/decoder.h +++ b/lib/dvb/decoder.h @@ -193,6 +193,8 @@ public: int getVideoProgressive(); int getVideoFrameRate(); int getVideoAspect(); + static RESULT setHwPCMDelay(int delay); + static RESULT setHwAC3Delay(int delay); }; #endif diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 894287e..a8dfb19 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -1462,12 +1462,7 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off continue; } - size_t iframe_len; - /* try to align to iframe */ - int direction = pts < 0 ? -1 : 1; - m_tstools.findFrame(offset, iframe_len, direction); - - eDebug("ok, resolved skip (rel: %d, diff %lld), now at %08llx (skipped additional %d frames due to iframe re-align)", relative, pts, offset, direction); + eDebug("ok, resolved skip (rel: %d, diff %lld), now at %08llx", relative, pts, offset); current_offset = align(offset, blocksize); /* in case tstools return non-aligned offset */ } diff --git a/lib/dvb/pvrparse.cpp b/lib/dvb/pvrparse.cpp index 1393bf7..5cdecbd 100644 --- a/lib/dvb/pvrparse.cpp +++ b/lib/dvb/pvrparse.cpp @@ -244,6 +244,7 @@ off_t eMPEGStreamInformation::getAccessPoint(pts_t ts, int marg) off_t last = 0; off_t last2 = 0; pts_t lastc = 0; + ts += 1; // Add rounding error margin for (std::map::const_iterator i(m_access_points.begin()); i != m_access_points.end(); ++i) { pts_t delta = getDelta(i->first); diff --git a/lib/dvb/tstools.cpp b/lib/dvb/tstools.cpp index a9eef40..2e5c566 100644 --- a/lib/dvb/tstools.cpp +++ b/lib/dvb/tstools.cpp @@ -652,18 +652,23 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram int eDVBTSTools::findNextPicture(off_t &offset, size_t &len, int &distance, int frame_types) { - int nr_frames = 0; + int nr_frames, direction; // eDebug("trying to move %d frames at %llx", distance, offset); frame_types = frametypeI; /* TODO: intelligent "allow IP frames when not crossing an I-Frame */ - int direction = distance > 0 ? 0 : -1; - distance = abs(distance); - off_t new_offset = offset; size_t new_len = len; int first = 1; + if (distance > 0) { + direction = 0; + nr_frames = 0; + } else { + direction = -1; + nr_frames = -1; + distance = -distance+1; + } while (distance > 0) { int dir = direction; @@ -677,12 +682,18 @@ int eDVBTSTools::findNextPicture(off_t &offset, size_t &len, int &distance, int // eDebug("we moved %d, %d to go frames (now at %llx)", dir, distance, new_offset); - if (distance >= 0 || first) + if (distance >= 0 || direction == 0) { first = 0; offset = new_offset; len = new_len; nr_frames += abs(dir); + } + else if (first) { + first = 0; + offset = new_offset; + len = new_len; + nr_frames += abs(dir) + distance; // never jump forward during rewind } } diff --git a/lib/python/Components/ChoiceList.py b/lib/python/Components/ChoiceList.py old mode 100644 new mode 100755 index fe505c2..4700e9e --- a/lib/python/Components/ChoiceList.py +++ b/lib/python/Components/ChoiceList.py @@ -1,5 +1,5 @@ from MenuList import MenuList -from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename +from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap @@ -10,7 +10,7 @@ def ChoiceEntryComponent(key, text): else: res.append((eListboxPythonMultiContent.TYPE_TEXT, 45, 00, 800, 25, 0, RT_HALIGN_LEFT, text[0])) - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/buttons/key_" + key + ".png")) + png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/key_" + key + ".png")) if png is not None: res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 5, 0, 35, 25, png)) diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py old mode 100644 new mode 100755 index 00949e2..418a1b6 --- a/lib/python/Components/ConfigList.py +++ b/lib/python/Components/ConfigList.py @@ -1,7 +1,7 @@ from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent -from config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS, ConfigElement -from Components.ActionMap import NumberActionMap +from config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS, ConfigElement, ConfigText, ConfigPassword +from Components.ActionMap import NumberActionMap, ActionMap from enigma import eListbox, eListboxPythonConfigContent, eRCInput, eTimer from Screens.MessageBox import MessageBox @@ -66,6 +66,7 @@ class ConfigList(HTMLComponent, GUIComponent, object): self.current = self.getCurrent() if self.current: self.current[1].onSelect(self.session) + for x in self.onSelectionChanged: x() @@ -127,13 +128,52 @@ class ConfigListScreen: "9": self.keyNumberGlobal, "0": self.keyNumberGlobal }, -1) # to prevent left/right overriding the listbox + + self["VirtualKB"] = ActionMap(["VirtualKeyboardActions"], + { + "showVirtualKeyboard": self.KeyText, + }, -2) + self["VirtualKB"].setEnabled(False) self["config"] = ConfigList(list, session = session) + if on_change is not None: self.__changed = on_change else: self.__changed = lambda: None - + + if not self.handleInputHelpers in self["config"].onSelectionChanged: + self["config"].onSelectionChanged.append(self.handleInputHelpers) + + def handleInputHelpers(self): + if self["config"].getCurrent() is not None: + if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword): + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(True) + self["VKeyIcon"].boolean = True + if self.has_key("HelpWindow"): + if self["config"].getCurrent()[1].help_window.instance is not None: + helpwindowpos = self["HelpWindow"].getPosition() + from enigma import ePoint + self["config"].getCurrent()[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) + else: + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(False) + self["VKeyIcon"].boolean = False + else: + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(False) + self["VKeyIcon"].boolean = False + + def KeyText(self): + from Screens.VirtualKeyBoard import VirtualKeyBoard + self.session.openWithCallback(self.VirtualKeyBoardCallback, VirtualKeyBoard, title = self["config"].getCurrent()[0], text = self["config"].getCurrent()[1].getValue()) + + def VirtualKeyBoardCallback(self, callback = None): + if callback is not None and len(callback): + self["config"].getCurrent()[1].setValue(callback) + self["config"].invalidate(self["config"].getCurrent()) + def keyOK(self): self["config"].handleKey(KEY_OK) diff --git a/lib/python/Components/EpgList.py b/lib/python/Components/EpgList.py old mode 100644 new mode 100755 index 59f9262..41cd1b2 --- a/lib/python/Components/EpgList.py +++ b/lib/python/Components/EpgList.py @@ -8,7 +8,7 @@ from Tools.LoadPixmap import LoadPixmap from time import localtime, time from ServiceReference import ServiceReference -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN EPG_TYPE_SINGLE = 0 EPG_TYPE_MULTI = 1 @@ -53,11 +53,11 @@ class EPGList(HTMLComponent, GUIComponent): assert(type == EPG_TYPE_SIMILAR) self.l.setBuildFunc(self.buildSimilarEntry) self.epgcache = eEPGCache.getInstance() - self.clock_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock.png')) - self.clock_add_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_add.png')) - self.clock_pre_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_pre.png')) - self.clock_post_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_post.png')) - self.clock_prepost_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_prepost.png')) + self.clock_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png')) + self.clock_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png')) + self.clock_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png')) + self.clock_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png')) + self.clock_prepost_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png')) def getEventFromId(self, service, eventid): event = None diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 38b0854..222512e 100755 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -3,7 +3,7 @@ from os import path as os_path, listdir from MenuList import MenuList from Components.Harddisk import harddiskmanager -from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename +from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename, fileExists from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \ eServiceReference, eServiceCenter, gFont @@ -23,7 +23,6 @@ EXTENSIONS = { "ts": "movie", "avi": "movie", "divx": "movie", - "m4v": "movie", "mpg": "movie", "mpeg": "movie", "mkv": "movie", @@ -35,12 +34,12 @@ def FileEntryComponent(name, absolute = None, isDir = False): res = [ (absolute, isDir) ] res.append((eListboxPythonMultiContent.TYPE_TEXT, 35, 1, 470, 20, 0, RT_HALIGN_LEFT, name)) if isDir: - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/directory.png")) + png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "extensions/directory.png")) else: extension = name.split('.') extension = extension[-1].lower() if EXTENSIONS.has_key(extension): - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/" + EXTENSIONS[extension] + ".png")) + png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "extensions/" + EXTENSIONS[extension] + ".png")) else: png = None if png is not None: @@ -160,8 +159,11 @@ class FileList(MenuList): directories.sort() files.sort() else: - if os_path.exists(directory): - files = listdir(directory) + if fileExists(directory): + try: + files = listdir(directory) + except: + files = [] files.sort() tmpfiles = files[:] for x in tmpfiles: @@ -256,12 +258,12 @@ def MultiFileSelectEntryComponent(name, absolute = None, isDir = False, selected res = [ (absolute, isDir, selected, name) ] res.append((eListboxPythonMultiContent.TYPE_TEXT, 55, 1, 470, 20, 0, RT_HALIGN_LEFT, name)) if isDir: - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/directory.png")) + png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "extensions/directory.png")) else: extension = name.split('.') extension = extension[-1].lower() if EXTENSIONS.has_key(extension): - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/" + EXTENSIONS[extension] + ".png")) + png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "extensions/" + EXTENSIONS[extension] + ".png")) else: png = None if png is not None: @@ -269,10 +271,10 @@ def MultiFileSelectEntryComponent(name, absolute = None, isDir = False, selected if not name.startswith('<'): if selected is False: - icon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_off.png")) + icon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_off.png")) res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 2, 0, 25, 25, icon)) else: - icon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_on.png")) + icon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_on.png")) res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 2, 0, 25, 25, icon)) return res @@ -374,8 +376,11 @@ class MultiFileSelectList(FileList): directories.sort() files.sort() else: - if os_path.exists(directory): - files = listdir(directory) + if fileExists(directory): + try: + files = listdir(directory) + except: + files = [] files.sort() tmpfiles = files[:] for x in tmpfiles: diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 2efdb68..03f574f 100755 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -290,7 +290,10 @@ class Harddisk: # any access has been made to the disc. If there has been no access over a specifed time, # we set the hdd into standby. def readStats(self): - l = readFile("/sys/block/%s/stat" % self.device) + try: + l = open("/sys/block/%s/stat" % self.device).read() + except IOError: + return -1,-1 (nr_read, _, _, _, nr_write) = l.split()[:5] return int(nr_read), int(nr_write) @@ -319,7 +322,7 @@ class Harddisk: l = sum(stats) print "sum", l, "prev_sum", self.last_stat - if l != self.last_stat: # access + if l != self.last_stat and l >= 0: # access print "hdd was accessed since previous check!" self.last_stat = l self.last_access = t diff --git a/lib/python/Components/MediaPlayer.py b/lib/python/Components/MediaPlayer.py old mode 100644 new mode 100755 index 12f2727..5583b22 --- a/lib/python/Components/MediaPlayer.py +++ b/lib/python/Components/MediaPlayer.py @@ -1,6 +1,6 @@ from MenuList import MenuList -from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename +from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from os import path from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter @@ -14,11 +14,11 @@ STATE_REWIND = 3 STATE_FORWARD = 4 STATE_NONE = 5 -PlayIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/ico_mp_play.png")) -PauseIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/ico_mp_pause.png")) -StopIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/ico_mp_stop.png")) -RewindIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/ico_mp_rewind.png")) -ForwardIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/ico_mp_forward.png")) +PlayIcon = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_mp_play.png")) +PauseIcon = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_mp_pause.png")) +StopIcon = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_mp_stop.png")) +RewindIcon = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_mp_rewind.png")) +ForwardIcon = LoadPixmap(path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_mp_forward.png")) def PlaylistEntryComponent(serviceref, state): res = [ serviceref ] diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 05204a7..78e17bb 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -947,7 +947,7 @@ def InitNimManager(nimmgr): lnb_choices = { "universal_lnb": _("Universal LNB"), -# "unicable": _("Unicable"), + "unicable": _("Unicable"), "c_band": _("C-Band"), "user_defined": _("User defined")} diff --git a/lib/python/Components/ParentalControl.py b/lib/python/Components/ParentalControl.py old mode 100644 new mode 100755 diff --git a/lib/python/Components/SelectionList.py b/lib/python/Components/SelectionList.py old mode 100644 new mode 100755 index 08af7d0..1c5423f --- a/lib/python/Components/SelectionList.py +++ b/lib/python/Components/SelectionList.py @@ -1,9 +1,9 @@ from MenuList import MenuList -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT from Tools.LoadPixmap import LoadPixmap -selectionpng = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/selectioncross.png")) +selectionpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/selectioncross.png")) def SelectionEntryComponent(description, value, index, selected): res = [ diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py old mode 100644 new mode 100755 index b0283c1..6095812 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -5,7 +5,7 @@ from skin import parseColor, parseFont from enigma import eListboxServiceContent, eListbox, eServiceCenter, eServiceReference, gFont, eRect from Tools.LoadPixmap import LoadPixmap -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN class ServiceList(HTMLComponent, GUIComponent): MODE_NORMAL = 0 @@ -15,27 +15,27 @@ class ServiceList(HTMLComponent, GUIComponent): GUIComponent.__init__(self) self.l = eListboxServiceContent() - pic = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/folder.png")) + pic = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/folder.png")) if pic: self.l.setPixmap(self.l.picFolder, pic) - pic = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/marker.png")) + pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/marker.png")) if pic: self.l.setPixmap(self.l.picMarker, pic) - pic = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "ico_dvb_s-fs8.png")) + pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_s-fs8.png")) if pic: self.l.setPixmap(self.l.picDVB_S, pic) - pic = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "ico_dvb_c-fs8.png")) + pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_c-fs8.png")) if pic: self.l.setPixmap(self.l.picDVB_C, pic) - pic = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "ico_dvb_t-fs8.png")) + pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_t-fs8.png")) if pic: self.l.setPixmap(self.l.picDVB_T, pic) - pic = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "ico_service_group-fs8.png")) + pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_service_group-fs8.png")) if pic: self.l.setPixmap(self.l.picServiceGroup, pic) diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py index d2b405a..f9c4065 100644 --- a/lib/python/Components/SystemInfo.py +++ b/lib/python/Components/SystemInfo.py @@ -1,5 +1,6 @@ from enigma import eDVBResourceManager from Tools.Directories import fileExists +from Tools.HardwareInfo import HardwareInfo SystemInfo = { } @@ -27,3 +28,4 @@ def countFrontpanelLEDs(): SystemInfo["NumFrontpanelLEDs"] = countFrontpanelLEDs() SystemInfo["FrontpanelDisplay"] = fileExists("/dev/dbox/oled0") or fileExists("/dev/dbox/lcd0") SystemInfo["FrontpanelDisplayGrayscale"] = fileExists("/dev/dbox/oled0") +SystemInfo["DeepstandbySupport"] = HardwareInfo().get_device_name() != "dm800" diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py old mode 100644 new mode 100755 index 44a7eb4..2a7405d --- a/lib/python/Components/TimerList.py +++ b/lib/python/Components/TimerList.py @@ -7,7 +7,7 @@ from enigma import eListboxPythonMultiContent, eListbox, gFont, \ RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_CENTER from Tools.LoadPixmap import LoadPixmap from timer import TimerEntry -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN class TimerList(HTMLComponent, GUIComponent, object): # @@ -65,7 +65,7 @@ class TimerList(HTMLComponent, GUIComponent, object): res.append((eListboxPythonMultiContent.TYPE_TEXT, width-150, 50, 150, 20, 1, RT_HALIGN_RIGHT|RT_VALIGN_CENTER, state)) if timer.disabled: - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/redx.png")) + png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/redx.png")) res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 490, 5, 40, 40, png)) return res diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 6fcab8b..680b594 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -1,5 +1,6 @@ from Components.Harddisk import harddiskmanager from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet, ConfigLocations +from Tools.Directories import resolveFilename, SCOPE_HDD from enigma import Misc_Options, setTunerTypePriorityOrder; from SystemInfo import SystemInfo import os @@ -30,8 +31,11 @@ def InitUsageConfig(): ("standard", _("standard")), ("swap", _("swap PiP and main picture")), ("swapstop", _("move PiP to main picture")), ("stop", _("stop PiP")) ]) + config.usage.default_path = ConfigText(default = resolveFilename(SCOPE_HDD)) + config.usage.timer_path = ConfigText(default = "") + config.usage.instantrec_path = ConfigText(default = "") + config.usage.timeshift_path = ConfigText(default = "/media/hdd/") config.usage.allowed_timeshift_paths = ConfigLocations(default = ["/media/hdd/"]) - config.usage.timeshift_path = ConfigText(default = "/media/hdd") config.usage.on_movie_start = ConfigSelection(default = "ask", choices = [ ("ask", _("Ask user")), ("resume", _("Resume from last position")), ("beginning", _("Start from the beginning")) ]) @@ -65,19 +69,19 @@ def InitUsageConfig(): def TunerTypePriorityOrderChanged(configElement): setTunerTypePriorityOrder(int(configElement.value)) - config.usage.alternatives_priority.addNotifier(TunerTypePriorityOrderChanged) + config.usage.alternatives_priority.addNotifier(TunerTypePriorityOrderChanged, immediate_feedback=False) def setHDDStandby(configElement): for hdd in harddiskmanager.HDDList(): hdd[1].setIdleTime(int(configElement.value)) - config.usage.hdd_standby.addNotifier(setHDDStandby) + config.usage.hdd_standby.addNotifier(setHDDStandby, immediate_feedback=False) def set12VOutput(configElement): if configElement.value == "on": Misc_Options.getInstance().set_12V_output(1) elif configElement.value == "off": Misc_Options.getInstance().set_12V_output(0) - config.usage.output_12V.addNotifier(set12VOutput) + config.usage.output_12V.addNotifier(set12VOutput, immediate_feedback=False) SystemInfo["12V_Output"] = Misc_Options.getInstance().detected_12V_output() @@ -128,3 +132,23 @@ def updateChoices(sel, choices): defval = str(x) break sel.setChoices(map(str, choices), defval) + +def preferredPath(path): + if config.usage.setup_level.index < 2 or path == "": + return None # config.usage.default_path.value, but delay lookup until usage + elif path == "": + return config.movielist.last_videodir.value + elif path == "": + return config.movielist.last_timer_videodir.value + else: + return path + +def preferredTimerPath(): + return preferredPath(config.usage.timer_path.value) + +def preferredInstantRecordPath(): + return preferredPath(config.usage.instantrec_path.value) + +def defaultMoviePath(): + return config.usage.default_path.value + diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 1f8709b..a6007b1 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1,6 +1,6 @@ from enigma import getPrevAsciiCode from Tools.NumericalTextInput import NumericalTextInput -from Tools.Directories import resolveFilename, SCOPE_CONFIG +from Tools.Directories import resolveFilename, SCOPE_CONFIG, fileExists from Components.Harddisk import harddiskmanager from copy import copy as copy_copy from os import path as os_path @@ -1283,7 +1283,6 @@ class ConfigLocations(ConfigElement): self.default = default self.locations = [] self.mountpoints = [] - harddiskmanager.on_partition_list_change.append(self.mountpointsChanged) self.value = default[:] def setValue(self, value): @@ -1320,7 +1319,7 @@ class ConfigLocations(ConfigElement): locations = [[x, None, False, False] for x in tmp] self.refreshMountpoints() for x in locations: - if os_path.exists(x[0]): + if fileExists(x[0]): x[1] = self.getMountpoint(x[0]) x[2] = True self.locations = locations @@ -1339,20 +1338,11 @@ class ConfigLocations(ConfigElement): return False return self.tostring([x[0] for x in locations]) != sv - def mountpointsChanged(self, action, dev): - print "Mounts changed: ", action, dev - mp = dev.mountpoint+"/" - if action == "add": - self.addedMount(mp) - elif action == "remove": - self.removedMount(mp) - self.refreshMountpoints() - def addedMount(self, mp): for x in self.locations: if x[1] == mp: x[2] = True - elif x[1] == None and os_path.exists(x[0]): + elif x[1] == None and fileExists(x[0]): x[1] = self.getMountpoint(x[0]) x[2] = True @@ -1362,7 +1352,7 @@ class ConfigLocations(ConfigElement): x[2] = False def refreshMountpoints(self): - self.mountpoints = [p.mountpoint + "/" for p in harddiskmanager.getMountedPartitions() if p.mountpoint != "/"] + self.mountpoints = [p.mountpoint for p in harddiskmanager.getMountedPartitions() if p.mountpoint != "/"] self.mountpoints.sort(key = lambda x: -len(x)) def checkChangedMountpoints(self): diff --git a/lib/python/Plugins/Extensions/CutListEditor/meta/plugin_cutlisteditor.xml b/lib/python/Plugins/Extensions/CutListEditor/meta/plugin_cutlisteditor.xml old mode 100644 new mode 100755 index 23edc8e..1431caf --- a/lib/python/Plugins/Extensions/CutListEditor/meta/plugin_cutlisteditor.xml +++ b/lib/python/Plugins/Extensions/CutListEditor/meta/plugin_cutlisteditor.xml @@ -8,7 +8,7 @@ enigma2-plugin-extensions-cutlisteditor CutListEditor allows you to edit your movies. CutListEditor allows you to edit your movies.\nSeek to the start of the stuff you want to cut away. Press OK, select 'start cut'.\nThen seek to the end, press OK, select 'end cut'. That's it. - + Dream Multimedia @@ -17,7 +17,7 @@ Mit dem Schnitteditor können Sie Ihre Aufnahmen schneiden. Mit dem Schnitteditor können Sie Ihre Aufnahmen schneiden.\nSpulen Sie zum Anfang des zu schneidenden Teils der Aufnahme. Drücken Sie dann OK und wählen Sie: 'start cut'.\nDann spulen Sie zum Ende, drücken OK und wählen 'end cut'. Das ist alles. - + diff --git a/lib/python/Plugins/Extensions/CutListEditor/plugin.py b/lib/python/Plugins/Extensions/CutListEditor/plugin.py index 7566346..efe9f76 100644 --- a/lib/python/Plugins/Extensions/CutListEditor/plugin.py +++ b/lib/python/Plugins/Extensions/CutListEditor/plugin.py @@ -7,6 +7,7 @@ from Components.ActionMap import HelpableActionMap from Components.MultiContent import MultiContentEntryText from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase from Components.VideoWindow import VideoWindow +from Components.Label import Label from Screens.InfoBarGenerics import InfoBarSeek, InfoBarCueSheetSupport from Components.GUIComponent import GUIComponent from enigma import eListboxPythonMultiContent, eListbox, gFont, iPlayableService, RT_HALIGN_RIGHT @@ -119,12 +120,13 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He Name - + Position,Detailed - - - + + + + {"template": [ MultiContentEntryText(size=(125, 20), text = 1, backcolor = MultiContentTemplateColor(3)), @@ -161,6 +163,9 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He self["Timeline"] = ServicePositionGauge(self.session.nav) self["cutlist"] = List(self.getCutlist()) self["cutlist"].onSelectionChanged.append(self.selectionChanged) + self["SeekState"] = Label() + self.onPlayStateChanged.append(self.updateStateLabel) + self.updateStateLabel(self.seekstate) self["Video"] = VideoWindow(decoder = 0) @@ -184,13 +189,17 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He }) # to track new entries we save the last version of the cutlist - self.last_cuts = [ ] + self.last_cuts = self.getCutlist() self.cut_start = None + self.inhibit_seek = False self.onClose.append(self.__onClose) def __onClose(self): self.session.nav.playService(self.old_service) + def updateStateLabel(self, state): + self["SeekState"].setText(state[3].strip()) + def showTutorial(self): if not self.tutorial_seen: self.tutorial_seen = True @@ -238,44 +247,46 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He return r def selectionChanged(self): - where = self["cutlist"].getCurrent() - if where is None: - print "no selection" - return - pts = where[0][0] - seek = self.getSeek() - if seek is None: - print "no seek" - return - seek.seekTo(pts) + if not self.inhibit_seek: + where = self["cutlist"].getCurrent() + if where is None: + print "no selection" + return + pts = where[0][0] + seek = self.getSeek() + if seek is None: + print "no seek" + return + seek.seekTo(pts) def refillList(self): print "cue sheet changed, refilling" self.downloadCuesheet() - # get the first changed entry, and select it + # get the first changed entry, counted from the end, and select it new_list = self.getCutlist() self["cutlist"].list = new_list - for i in range(min(len(new_list), len(self.last_cuts))): - if new_list[i] != self.last_cuts[i]: - self["cutlist"].setIndex(i) + l1 = len(new_list) + l2 = len(self.last_cuts) + for i in range(min(l1, l2)): + if new_list[l1-i-1] != self.last_cuts[l2-i-1]: + self["cutlist"].setIndex(l1-i-1) break self.last_cuts = new_list def getStateForPosition(self, pos): - state = 0 # in - - # when first point is "in", the beginning is "out" - if len(self.cut_list) and self.cut_list[0][1] == 0: - state = 1 - + state = -1 for (where, what) in self.cut_list: - if where < pos: - if what == 0: # in - state = 0 - elif what == 1: # out + if what in [0, 1]: + if where < pos: + state = what + elif where == pos: state = 1 + elif state == -1: + state = 1 - what + if state == -1: + state = 0 return state def showMenu(self): @@ -329,11 +340,11 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He in_after = None for (where, what) in self.cut_list: - if what == 1 and where < self.context_position: # out + if what == 1 and where <= self.context_position: # out out_before = (where, what) elif what == 0 and where < self.context_position: # in, before out out_before = None - elif what == 0 and where > self.context_position and in_after is None: + elif what == 0 and where >= self.context_position and in_after is None: in_after = (where, what) if out_before is not None: @@ -341,12 +352,16 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He if in_after is not None: self.cut_list.remove(in_after) + self.inhibit_seek = True self.uploadCuesheet() + self.inhibit_seek = False elif result == CutListContextMenu.RET_MARK: self.__addMark() elif result == CutListContextMenu.RET_DELETEMARK: self.cut_list.remove(self.context_nearest_mark) + self.inhibit_seek = True self.uploadCuesheet() + self.inhibit_seek = False elif result == CutListContextMenu.RET_REMOVEBEFORE: # remove in/out marks before current position for (where, what) in self.cut_list[:]: @@ -354,7 +369,9 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He self.cut_list.remove((where, what)) # add 'in' point bisect.insort(self.cut_list, (self.context_position, 0)) + self.inhibit_seek = True self.uploadCuesheet() + self.inhibit_seek = False elif result == CutListContextMenu.RET_REMOVEAFTER: # remove in/out marks after current position for (where, what) in self.cut_list[:]: @@ -362,7 +379,9 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He self.cut_list.remove((where, what)) # add 'out' point bisect.insort(self.cut_list, (self.context_position, 1)) + self.inhibit_seek = True self.uploadCuesheet() + self.inhibit_seek = False elif result == CutListContextMenu.RET_GRABFRAME: self.grabFrame() diff --git a/lib/python/Plugins/Extensions/DVDBurn/meta/Makefile.am b/lib/python/Plugins/Extensions/DVDBurn/meta/Makefile.am index 1899cb7..0b3be7d 100755 --- a/lib/python/Plugins/Extensions/DVDBurn/meta/Makefile.am +++ b/lib/python/Plugins/Extensions/DVDBurn/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_dvdburn.xml + +EXTRA_DIST = dvdburn_de.jpg dvdburn_en.jpg diff --git a/lib/python/Plugins/Extensions/DVDBurn/meta/dvdburn_de.jpg b/lib/python/Plugins/Extensions/DVDBurn/meta/dvdburn_de.jpg new file mode 100755 index 0000000..4472971 Binary files /dev/null and b/lib/python/Plugins/Extensions/DVDBurn/meta/dvdburn_de.jpg differ diff --git a/lib/python/Plugins/Extensions/DVDBurn/meta/dvdburn_en.jpg b/lib/python/Plugins/Extensions/DVDBurn/meta/dvdburn_en.jpg new file mode 100755 index 0000000..509816d Binary files /dev/null and b/lib/python/Plugins/Extensions/DVDBurn/meta/dvdburn_en.jpg differ diff --git a/lib/python/Plugins/Extensions/DVDBurn/meta/plugin_dvdburn.xml b/lib/python/Plugins/Extensions/DVDBurn/meta/plugin_dvdburn.xml old mode 100644 new mode 100755 index 7971539..647d1cf --- a/lib/python/Plugins/Extensions/DVDBurn/meta/plugin_dvdburn.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/meta/plugin_dvdburn.xml @@ -9,6 +9,7 @@ enigma2-plugin-extensions-dvdburn With DVDBurn you can burn your recordings to a dvd. With DVDBurn you can burn your recordings to a dvd.\nArchive all your favorite movies to recordable dvds with menus if wanted. + Dream Multimedia @@ -16,6 +17,7 @@ enigma2-plugin-extensions-dvdburn Mit DVDBurn brennen Sie ihre Aufnahmen auf DVD. Mit DVDBurn brennen Sie ihre Aufnahmen auf DVD.\nArchivieren Sie Ihre Liblingsfilme auf DVD mit Menus wenn Sie es wünschen. + diff --git a/lib/python/Plugins/Extensions/DVDPlayer/meta/plugin_dvdplayer.xml b/lib/python/Plugins/Extensions/DVDPlayer/meta/plugin_dvdplayer.xml old mode 100644 new mode 100755 index 2658138..1353f7d --- a/lib/python/Plugins/Extensions/DVDPlayer/meta/plugin_dvdplayer.xml +++ b/lib/python/Plugins/Extensions/DVDPlayer/meta/plugin_dvdplayer.xml @@ -8,7 +8,7 @@ enigma2-plugin-extensions-dvdplayer DVDPlayer plays your DVDs on your Dreambox. DVDPlayer plays your DVDs on your Dreambox.\nWith the DVDPlayer you can play your DVDs on your Dreambox from a DVD or even from an iso file or video_ts folder on your harddisc or network. - + Dream Multimedia @@ -17,7 +17,7 @@ Spielen Sie Ihre DVDs mit dem DVDPlayer auf Ihrer Dreambox ab. Spielen Sie Ihre DVDs mit dem DVDPlayer auf Ihrer Dreambox ab.\nMit dem DVDPlayer können Sie Ihre DVDs auf Ihrer Dreambox abspielen. Dabei ist es egal ob Sie von DVD, iso-Datei oder sogar direkt von einer video_ts Ordnerstruktur von Ihrer Festplatte oder dem Netzwerk abspielen. - + diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py old mode 100644 new mode 100755 index b22c4b8..1d621f4 --- a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py @@ -16,7 +16,7 @@ from Screens.TimerEntry import TimerEntry from Screens.EpgSelection import EPGSelection from Screens.TimerEdit import TimerSanityConflict from Screens.MessageBox import MessageBox -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from RecordTimer import RecordTimerEntry, parseEvent, AFTEREVENT from ServiceReference import ServiceReference from Tools.LoadPixmap import LoadPixmap @@ -41,11 +41,11 @@ class EPGList(HTMLComponent, GUIComponent): if overjump_empty: self.l.setSelectableFunc(self.isSelectable) self.epgcache = eEPGCache.getInstance() - self.clock_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock.png')) - self.clock_add_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_add.png')) - self.clock_pre_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_pre.png')) - self.clock_post_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_post.png')) - self.clock_prepost_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'skin_default/icons/epgclock_prepost.png')) + self.clock_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png')) + self.clock_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png')) + self.clock_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png')) + self.clock_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png')) + self.clock_prepost_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png')) self.time_base = None self.time_epoch = time_epoch self.list = None diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_de.jpg b/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_de.jpg old mode 100644 new mode 100755 index 8dfdbbf..b68d095 Binary files a/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_de.jpg and b/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_de.jpg differ diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_en.jpg b/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_en.jpg old mode 100644 new mode 100755 index 95b6665..6953f27 Binary files a/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_en.jpg and b/lib/python/Plugins/Extensions/GraphMultiEPG/meta/graphmultiepg_en.jpg differ diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml b/lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml old mode 100644 new mode 100755 index 7b0b134..a10840d --- a/lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml @@ -9,7 +9,7 @@ eenigma2-plugin-extensions-graphmultiepg GraphMultiEPG shows a graphical timeline EPG. GraphMultiEPG shows a graphical timeline EPG.\nShows a nice overview of all running und upcoming tv shows. - + Dream Multimedia @@ -18,7 +18,7 @@ Zeigt ein grafisches Zeitlinien-EPG. Zeigt ein grafisches Zeitlinien-EPG.\nZeigt eine grafische Übersicht aller laufenden und kommenden Sendungen. - + diff --git a/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_de.jpg b/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_de.jpg old mode 100644 new mode 100755 index 4396161..41a67c2 Binary files a/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_de.jpg and b/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_de.jpg differ diff --git a/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_en.jpg b/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_en.jpg old mode 100644 new mode 100755 index e1d3575..6bfbbc5 Binary files a/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_en.jpg and b/lib/python/Plugins/Extensions/MediaPlayer/meta/mediaplayer_en.jpg differ diff --git a/lib/python/Plugins/Extensions/MediaPlayer/meta/plugin_mediaplayer.xml b/lib/python/Plugins/Extensions/MediaPlayer/meta/plugin_mediaplayer.xml old mode 100644 new mode 100755 index 825793f..2f9f22b --- a/lib/python/Plugins/Extensions/MediaPlayer/meta/plugin_mediaplayer.xml +++ b/lib/python/Plugins/Extensions/MediaPlayer/meta/plugin_mediaplayer.xml @@ -8,7 +8,7 @@ enigma2-plugin-extensions-mediaplayer Mediaplayer plays your favorite music and videos. Mediaplayer plays your favorite music and videos.\nPlay all your favorite music and video files, organize them in playlists, view cover and album information. - + Dream Multimedia @@ -17,7 +17,7 @@ Mediaplayer spielt Ihre Musik und Videos. Mediaplayer spielt Ihre Musik und Videos.\nSie können all Ihre Musik- und Videodateien abspielen, in Playlisten organisieren, Cover und Albuminformationen abrufen. - + diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py old mode 100644 new mode 100755 index 98bc060..0fc78fb --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -19,7 +19,7 @@ from Components.Playlist import PlaylistIOInternal, PlaylistIOM3U, PlaylistIOPLS from Components.AVSwitch import AVSwitch from Components.Harddisk import harddiskmanager from Components.config import config -from Tools.Directories import fileExists, pathExists, resolveFilename, SCOPE_CONFIG, SCOPE_PLAYLIST, SCOPE_SKIN_IMAGE +from Tools.Directories import fileExists, pathExists, resolveFilename, SCOPE_CONFIG, SCOPE_PLAYLIST, SCOPE_CURRENT_SKIN from settings import MediaPlayerSettings import random @@ -50,7 +50,7 @@ class MediaPixmap(Pixmap): noCoverFile = value break if noCoverFile is None: - noCoverFile = resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/no_coverArt.png") + noCoverFile = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/no_coverArt.png") self.noCoverPixmap = LoadPixmap(noCoverFile) return Pixmap.applySkin(self, desktop, screen) @@ -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|m2ts|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"] = self.filelist self.playlist = MyPlayList() diff --git a/lib/python/Plugins/Extensions/MediaScanner/meta/Makefile.am b/lib/python/Plugins/Extensions/MediaScanner/meta/Makefile.am index e2aa0e3..d80b8c2 100755 --- a/lib/python/Plugins/Extensions/MediaScanner/meta/Makefile.am +++ b/lib/python/Plugins/Extensions/MediaScanner/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_mediascanner.xml + +EXTRA_DIST = mediascanner_de.jpg mediascanner_en.jpg diff --git a/lib/python/Plugins/Extensions/MediaScanner/meta/mediascanner_de.jpg b/lib/python/Plugins/Extensions/MediaScanner/meta/mediascanner_de.jpg new file mode 100755 index 0000000..e6a191c Binary files /dev/null and b/lib/python/Plugins/Extensions/MediaScanner/meta/mediascanner_de.jpg differ diff --git a/lib/python/Plugins/Extensions/MediaScanner/meta/mediascanner_en.jpg b/lib/python/Plugins/Extensions/MediaScanner/meta/mediascanner_en.jpg new file mode 100755 index 0000000..b9561c2 Binary files /dev/null and b/lib/python/Plugins/Extensions/MediaScanner/meta/mediascanner_en.jpg differ diff --git a/lib/python/Plugins/Extensions/MediaScanner/meta/plugin_mediascanner.xml b/lib/python/Plugins/Extensions/MediaScanner/meta/plugin_mediascanner.xml old mode 100644 new mode 100755 index d899fdb..eced924 --- a/lib/python/Plugins/Extensions/MediaScanner/meta/plugin_mediascanner.xml +++ b/lib/python/Plugins/Extensions/MediaScanner/meta/plugin_mediascanner.xml @@ -9,6 +9,7 @@ enigma2-plugin-extensions-mediascanner MediaScanner scans devices for playable media files. MediaScanner scans devices for playable media files and displays a menu with possible actions like viewing pictures or playing movies. + Dream Multimedia @@ -17,6 +18,7 @@ MediaScanner durchsucht Geräte nach Mediendateien. MediaScanner durchsucht Geräte nach Mediendateien und bietet Ihnen die dazu passenden Aktionen an wie z.B. Bilder betrachten oder Videos abspielen. + diff --git a/lib/python/Plugins/Extensions/PicturePlayer/meta/plugin_pictureplayer.xml b/lib/python/Plugins/Extensions/PicturePlayer/meta/plugin_pictureplayer.xml old mode 100644 new mode 100755 index 40e59b6..faff978 --- a/lib/python/Plugins/Extensions/PicturePlayer/meta/plugin_pictureplayer.xml +++ b/lib/python/Plugins/Extensions/PicturePlayer/meta/plugin_pictureplayer.xml @@ -8,7 +8,7 @@ enigma2-plugin-extensions-pictureplayer PicturePlayer displays your photos on the TV. The PicturePlayer displays your photos on the TV.\nYou can view them as thumbnails or slideshow. - + Dream Multimedia @@ -17,7 +17,7 @@ Der Bildbetrachter zeigt Ihre Bilder auf dem Fernseher an. Der Bildbetrachter zeigt Ihre Bilder auf dem Fernseher an.\nSie können sich Ihre Bilder als Thumbnails, einzeln oder als Slideshow anzeigen lassen. - + diff --git a/lib/python/Plugins/Plugin.py b/lib/python/Plugins/Plugin.py index 8d538ef..7cf0c18 100755 --- a/lib/python/Plugins/Plugin.py +++ b/lib/python/Plugins/Plugin.py @@ -52,6 +52,8 @@ class PluginDescriptor: # reason (True: Networkconfig read finished, False: Networkconfig reload initiated ) WHERE_NETWORKCONFIG_READ = 12 + WHERE_AUDIOMENU = 13 + # fnc 'SoftwareSupported' or 'AdvancedSoftwareSupported' must take a parameter and return None # if the plugin should not be displayed inside Softwaremanger or return a function which is called with session # and 'None' as parameter to call the plugin from the Softwaremanager menus. "menuEntryName" and "menuEntryDescription" diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am index 94be474..d9d96bc 100755 --- a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_cleanupwizard.xml + +EXTRA_DIST = cleanupwizard_de.jpg cleanupwizard_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_de.jpg b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_de.jpg new file mode 100755 index 0000000..2f086fb Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_en.jpg b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_en.jpg new file mode 100755 index 0000000..d014cb5 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml index 10ccc73..99add3d 100755 --- a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml @@ -10,6 +10,7 @@ The CleanupWizard informs you when your internal free memory of your dreambox has droppen under 2MB. You can use this wizard to remove some extensions. + Dream Multimedia @@ -19,6 +20,7 @@ Der CleanupWizard informiert Sie, wenn der interne freie Speicher Ihrer Dreambox unter 2MB fällt. Sie können dann einige Erweiterungen deinstallieren um wieder Platz zu schaffen. + diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg old mode 100644 new mode 100755 index 120ac82..75771f9 Binary files a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg and b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml old mode 100644 new mode 100755 index bb2bf59..9abc598 --- a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml +++ b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml @@ -13,7 +13,7 @@ in your Dreambox and assign to each of them dedicated providers/services or caids.\n So it is then possible to watch a scrambled service while recording another one. - + Dream Multimedia @@ -24,7 +24,7 @@ So ist es möglich mit einem CI einen Sender aufzunehmen\n und mit einem anderen einen Sender zu schauen. - + diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am index b619c8c..aed728d 100755 --- a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_crashlogautosubmit.xml + +EXTRA_DIST = crashlogautosubmit_de.jpg crashlogautosubmit_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_de.jpg b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_de.jpg new file mode 100755 index 0000000..0489416 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_en.jpg b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_en.jpg new file mode 100755 index 0000000..5e5c728 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml old mode 100644 new mode 100755 index 261eb49..a118ed7 --- a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml @@ -10,6 +10,7 @@ With the CrashlogAutoSubmit extension it is possible to automatically send crashlogs found on your Harddrive to Dream Multimedia + Dream Multimedia @@ -17,8 +18,9 @@ enigma2-plugin-systemplugins-crashlogautosubmit Automatisches versenden von Crashlogs an Dream Multimedia Mit dem CrashlogAutoSubmit Plugin ist es möglich auf Ihrer Festplatte - gefundene Crashlogs automatisch an Dream Multimedia zu versenden. + gefundene Crashlogs automatisch an Dream Multimedia zu versenden. + diff --git a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg old mode 100644 new mode 100755 index a0fd3b1..f4d0a1e Binary files a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg and b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml old mode 100644 new mode 100755 index bf0ce25..41d41ed --- a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml +++ b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml @@ -10,7 +10,7 @@ Scans default lamedbs sorted by satellite with a connected dish positioner. With the DefaultServicesScanner extension you can scan default lamedbs sorted by satellite with a connected dish positioner. - + Dream Multimedia @@ -19,7 +19,7 @@ Standard Sendersuche nach Satellit mit einem Rotor. Mit der DefaultServicesScanner Erweiterung können Sie eine standard Sendersuche nach Satellit mit einem angeschlossenen Rotor durchführen. - + diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am index 8405ed7..9b0a2ed 100755 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_diseqctester.xml -EXTRA_DIST = diseqctester.jpg +EXTRA_DIST = diseqctester_de.jpg diseqctester_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester.jpg b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester.jpg deleted file mode 100644 index c872334..0000000 Binary files a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester.jpg and /dev/null differ diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_de.jpg b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_de.jpg new file mode 100755 index 0000000..5a6e153 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_en.jpg b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_en.jpg new file mode 100755 index 0000000..43dad76 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml old mode 100644 new mode 100755 index 5415db0..33808b3 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml @@ -10,7 +10,7 @@ Test your Diseqc equipment. With the DiseqcTester extension you can test your satellite equipment for Diseqc compatibility and errors. - + Dream Multimedia @@ -19,7 +19,7 @@ Testet Ihr Diseqc Equipment. Mit der DiseqcTester Erweiterung können Sie Ihr Satelliten-Equipment nach Diseqc-Kompatibilität und Fehlern überprüfen. - + diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am index 686bded..0633e7c 100755 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_nfiflash.xml -EXTRA_DIST = nfiflash.jpg +EXTRA_DIST = nfiflash_de.jpg nfiflash_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash.jpg b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash.jpg deleted file mode 100644 index 0a5fa46..0000000 Binary files a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash.jpg and /dev/null differ diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_de.jpg b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_de.jpg new file mode 100755 index 0000000..fec93f4 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_en.jpg b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_en.jpg new file mode 100755 index 0000000..32a9967 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml old mode 100644 new mode 100755 index 2de88f0..c81f4ca --- a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml @@ -12,7 +12,7 @@ With the NFIFlash extension it is possible to prepare a USB stick with an Dreambox image.\n It is then possible to flash your Dreambox with the image on that stick. - + Dream Multimedia @@ -22,7 +22,7 @@ Mit der NFIFlash Erweiterung können Sie ein Dreambox Image auf einen USB-Stick laden.\ Mit diesem USB-Stick ist es dann möglich Ihre Dreambox zu flashen. - + diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py b/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py index 4d36115..b158cde 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py @@ -4,15 +4,11 @@ from Screens.Rc import Rc from Screens.MessageBox import MessageBox from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap +from Components.Sources.Boolean import Boolean from Components.config import config, ConfigBoolean, configfile, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, getConfigListEntry, ConfigSelection, ConfigPassword from Components.Network import iNetwork -#from Components.Label import Label -#from Components.MenuList import MenuList -#from Components.PluginComponent import plugins -#from Plugins.Plugin import PluginDescriptor from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE -#import time, os, re config.misc.firstrun = ConfigBoolean(default = True) @@ -39,7 +35,7 @@ config.plugins.wlan.encryption.psk = NoSave(ConfigPassword(default = "mysecurewl class NetworkWizard(WizardLanguage, Rc): skin = """ - + @@ -52,6 +48,10 @@ class NetworkWizard(WizardLanguage, Rc): + + + + """ def __init__(self, session): self.xmlfile = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkWizard/networkwizard.xml") @@ -59,7 +59,10 @@ class NetworkWizard(WizardLanguage, Rc): Rc.__init__(self) self.session = session self["wizard"] = Pixmap() - + self["HelpWindow"] = Pixmap() + self["HelpWindow"].hide() + self["VKeyIcon"] = Boolean(False) + self.InterfaceState = None self.isInterfaceUp = None self.WlanPluginInstalled = None diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am index 98dbe80..e8f738c 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_networkwizard.xml + +EXTRA_DIST = networkwizard_en.jpg networkwizard_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_de.jpg b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_de.jpg new file mode 100755 index 0000000..3999a41 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_en.jpg b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_en.jpg new file mode 100755 index 0000000..0a0434a Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml index 660bbcd..4d3adcb 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml @@ -9,6 +9,7 @@ Step by step network configuration With the NetworkWizard you can easy configure your network step by step. + Dream Multimedia @@ -18,6 +19,7 @@ Mit dem NetzwerkWizard können Sie Ihr Netzwerk konfigurieren. Sie werden Schritt für Schritt durch die Konfiguration geleitet. + diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml old mode 100644 new mode 100755 index d20b2e6..2cb47c0 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml @@ -10,7 +10,7 @@ PositionerSetup helps you installing a motorized dish. With the PositionerSetup extension it is easy to install and configure a motorized dish. - + Dream Multimedia @@ -20,7 +20,7 @@ Die PositionerSetup Erweiterung unterstützt Sie beim einrichten und konfigurieren einer motorgesteuerten Satellitenantenne. - + diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg old mode 100644 new mode 100755 index 6307213..7f8d8d2 Binary files a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg and b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml old mode 100644 new mode 100755 index 8fa36e5..4c0c7af --- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml +++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml @@ -11,7 +11,7 @@ SatelliteEquipmentControl allows you to fine-tune DiSEqC-settings. With the SatelliteEquipmentControl extension it is possible to fine-tune DiSEqC-settings. - + Dream Multimedia @@ -20,7 +20,7 @@ Fein-Einstellungen für DiSEqC Die SatelliteEquipmentControl-Erweiterung unterstützt Sie beim Feintuning der DiSEqC Einstellungen. - + diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg old mode 100644 new mode 100755 index b9596a6..703650e Binary files a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg and b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml b/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml old mode 100644 new mode 100755 index aaab7e4..e9453de --- a/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml +++ b/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml @@ -8,10 +8,10 @@ Satfinder enigma2-plugin-systemplugins-satfinder Satfinder helps you to align your dish. - The Satfinder extension helps you to align your dish.\ + The Satfinder extension helps you to align your dish.\n It shows you informations about signal rate and errors. - + Dream Multimedia @@ -21,7 +21,7 @@ Die Satfinder-Erweiterung unterstützt Sie beim Ausrichten ihrer Satellitenanlage.\n Es zeigt Ihnen Daten wie Signalstärke und Fehlerrate an. - + diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg b/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg old mode 100644 new mode 100755 index c0bba0c..44f0981 Binary files a/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg and b/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am index 689d97e..d29fb00 100755 --- a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_skinselector.xml -EXTRA_DIST = skinselector.jpg +EXTRA_DIST = skinselector_de.jpg skinselector_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml old mode 100644 new mode 100755 index 4ce7f1b..717f732 --- a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml @@ -11,7 +11,7 @@ The SkinSelector shows a menu with selectable skins.\n It's now easy to change the look and feel of your Dreambox. - + Dream Multimedia @@ -21,7 +21,7 @@ Die SkinSelector Erweiterung zeigt Ihnen ein Menu mit auswählbaren Skins.\n Sie können nun einfach das Aussehen der grafischen Oberfläche Ihrer Dreambox verändern. - + diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector.jpg b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector.jpg deleted file mode 100644 index 74395ea..0000000 Binary files a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector.jpg and /dev/null differ diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_de.jpg b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_de.jpg new file mode 100755 index 0000000..3b40708 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_en.jpg b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_en.jpg new file mode 100755 index 0000000..b9f0bd3 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am index 341938c..05a87d5 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_softwaremanager.xml -EXTRA_DIST = softmanager.jpg +EXTRA_DIST = softwaremanager_en.jpg softwaremanager_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml old mode 100644 new mode 100755 index fa84670..cd425c3 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml @@ -11,7 +11,7 @@ The SoftwareManager manages your Dreambox software.\n It's easy to update your receiver's software, install or remove extensions or even backup and restore your system settings. - + Dream Multimedia @@ -22,7 +22,7 @@ Sie können nun einfach Ihre Dreambox-Software aktualisieren, neue Erweiterungen installieren oder entfernen, oder ihre Einstellungen sichern und wiederherstellen. - + diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softmanager.jpg b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softmanager.jpg deleted file mode 100644 index a9d5a62..0000000 Binary files a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softmanager.jpg and /dev/null differ diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_de.jpg b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_de.jpg new file mode 100755 index 0000000..54e6419 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_en.jpg b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_en.jpg new file mode 100755 index 0000000..0832f0a Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index 9279077..c70201b 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -23,7 +23,7 @@ from Components.About import about from Components.DreamInfoHandler import DreamInfoHandler from Components.Language import language from Components.AVSwitch import AVSwitch -from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE, SCOPE_METADIR +from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_PLUGIN, SCOPE_CURRENT_SKIN, SCOPE_METADIR from Tools.LoadPixmap import LoadPixmap from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad from cPickle import dump, load @@ -510,13 +510,13 @@ class PacketManager(Screen): def setStatus(self,status = None): if status: self.statuslist = [] - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if status == 'update': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) self.statuslist.append(( _("Package list update"), '', _("Trying to download a new packetlist. Please wait..." ),'',statuspng, divpng )) self['list'].setList(self.statuslist) elif status == 'error': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) self.statuslist.append(( _("Error"), '', _("There was an error downloading the packetlist. Please try again." ),'',statuspng, divpng )) self['list'].setList(self.statuslist) @@ -632,15 +632,15 @@ class PacketManager(Screen): self.buildPacketList() def buildEntryComponent(self, name, version, description, state): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if state == 'installed': - installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png")) + installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) return((name, version, description, state, installedpng, divpng)) elif state == 'upgradeable': - upgradeablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgradeable.png")) + upgradeablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgradeable.png")) return((name, version, description, state, upgradeablepng, divpng)) else: - installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png")) + installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) return((name, version, description, state, installablepng, divpng)) def buildPacketList(self): @@ -811,19 +811,19 @@ class PluginManager(Screen, DreamInfoHandler): self["key_green"].setText("") self["key_blue"].setText("") self["key_yellow"].setText("") - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if status == 'update': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) self.statuslist.append(( _("Package list update"), '', _("Trying to download a new packetlist. Please wait..." ),'', '', statuspng, divpng, None, '' )) self["list"].style = "default" self['list'].setList(self.statuslist) elif status == 'sync': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) self.statuslist.append(( _("Package list update"), '', _("Searching for new installed or removed packages. Please wait..." ),'', '', statuspng, divpng, None, '' )) self["list"].style = "default" self['list'].setList(self.statuslist) elif status == 'error': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) self.statuslist.append(( _("Error"), '', _("There was an error downloading the packetlist. Please try again." ),'', '', statuspng, divpng, None, '' )) self["list"].style = "default" self['list'].setList(self.statuslist) @@ -1010,18 +1010,18 @@ class PluginManager(Screen, DreamInfoHandler): self.Console.ePopen(cmd, self.InstallMetaPackage_Finished) def buildEntryComponent(self, name, details, description, packagename, state, selected = False): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if state == 'installed': - installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png")) + installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) return((name, details, description, packagename, state, installedpng, divpng, selected)) elif state == 'installable': - installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png")) + installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) return((name, details, description, packagename, state, installablepng, divpng, selected)) elif state == 'remove': - removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) return((name, details, description, packagename, state, removepng, divpng, selected)) elif state == 'install': - installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/install.png")) + installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) return((name, details, description, packagename, state, installpng, divpng, selected)) def buildPacketList(self, categorytag = None): @@ -1083,7 +1083,7 @@ class PluginManager(Screen, DreamInfoHandler): self.selectionChanged() def buildCategoryComponent(self, tag = None): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if tag is not None: if tag == 'System': return(( _("System"), _("View list of available system extensions" ), tag, divpng )) @@ -1242,10 +1242,10 @@ class PluginManagerInfo(Screen): self['list'].updateList(self.list) def buildEntryComponent(self, action,info): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) - upgradepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) - installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/install.png")) - removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + upgradepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) + installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) + removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) if action == 'install': return(( _('Installing'), info, installpng, divpng)) elif action == 'remove': @@ -1314,11 +1314,11 @@ class PluginManagerHelp(Screen): self['list'].updateList(self.list) def buildEntryComponent(self, state): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) - installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png")) - installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png")) - removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) - installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/install.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) + installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) + removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) + installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) if state == 'installed': return(( _('This plugin is installed.'), _('You can remove this plugin.'), installedpng, divpng)) @@ -1464,7 +1464,7 @@ class PluginDetails(Screen, DreamInfoHandler): if not noScreenshot: filename = self.thumbnail else: - filename = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/noprev.png") + filename = resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/noprev.png") sc = AVSwitch().getFramebufferScale() self.picload.setPara((self["screenshot"].instance.size().width(), self["screenshot"].instance.size().height(), sc[0], sc[1], False, 1, "#00000000")) diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am index 9e24808..2e80f30 100755 --- a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_videoenhancement.xml -EXTRA_DIST = videoenhancement.jpg +EXTRA_DIST = videoenhancement_en.jpg videoenhancement_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml index 33b222e..208c7e0 100755 --- a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml @@ -1,5 +1,8 @@ + + + @@ -9,15 +12,15 @@ enigma2-plugin-systemplugins-videoenhancement VideoEnhancement provides advanced video enhancement settings. The VideoEnhancement extension provides advanced video enhancement settings. - + Dream Multimedia - VideoEnhancement + Erweiterte A/V Einstellungen enigma2-plugin-systemplugins-videoenhancement - Videomode bietet erweiterte Video Konfigurationsoptionen. - Die Videomode-Erweiterung bietet erweiterte Video Konfigurationsoptionen. - + Erweiterte A/V Einstellungen für Ihre Dreambox. + Erweiterte A/V Einstellungen für Ihre Dreambox. + diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement.jpg b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement.jpg deleted file mode 100755 index 0e0ef6f..0000000 Binary files a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement.jpg and /dev/null differ diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_de.jpg b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_de.jpg new file mode 100755 index 0000000..ecf0161 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_en.jpg b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_en.jpg new file mode 100755 index 0000000..a97a7a3 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml b/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml old mode 100644 new mode 100755 index 75abb90..c460943 --- a/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml +++ b/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml @@ -9,7 +9,7 @@ enigma2-plugin-systemplugins-videotune VideoTune helps fine-tuning your tv display. The VideoTune helps fine-tuning your tv display.\nYou can control brightness and contrast of your tv. - + Dream Multimedia - DE @@ -18,7 +18,7 @@ VideoTune hilft beim fein-einstellen des Fernsehers. VideoTune hilf beim fein-einstellen des Fernsehers.\nSie können Kontrast und Helligkeit fein-einstellen. - + diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am index 6c012e8..ef47443 100755 --- a/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_videomode.xml -EXTRA_DIST = videomode.jpg +EXTRA_DIST = videomode_en.jpg videomode_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml b/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml old mode 100644 new mode 100755 index 3891e0b..fbb6e3f --- a/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml +++ b/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml @@ -9,7 +9,7 @@ enigma2-plugin-systemplugins-videomode Videomode provides advanced video modes. The Videomode extension provides advanced video modes. - + Dream Multimedia @@ -17,7 +17,7 @@ enigma2-plugin-systemplugins-videomode Videomode bietet erweiterte Video Einstellungen. Die Videomode-Erweiterung bietet erweiterte Video-Einstellungen. - + diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode.jpg b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode.jpg deleted file mode 100644 index adb5646..0000000 Binary files a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode.jpg and /dev/null differ diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_de.jpg b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_de.jpg new file mode 100755 index 0000000..00b7ac7 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_en.jpg b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_en.jpg new file mode 100755 index 0000000..1f4288b Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_en.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am b/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am index 365372c..2f36237 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am @@ -1,6 +1,6 @@ installdir = $(pkglibdir)/python/Plugins/SystemPlugins/WirelessLan -#SUBDIRS = meta +SUBDIRS = meta install_PYTHON = \ __init__.py \ diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am new file mode 100755 index 0000000..6bc4aab --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am @@ -0,0 +1,5 @@ +installdir = $(datadir)/meta/ + +dist_install_DATA = plugin_wirelesslan.xml + +EXTRA_DIST = wirelesslan_de.jpg wirelesslan_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml new file mode 100755 index 0000000..1f882b3 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml @@ -0,0 +1,27 @@ + + + + + + + Dream Multimedia + WirelessLan + enigma2-plugin-systemplugins-wirelesslan + Configure your WLAN network interface + The WirelessLan extensions helps you configuring your WLAN network interface. + + + + Dream Multimedia + WirelessLan + enigma2-plugin-systemplugins-wirelesslan + Konfigurieren Sie Ihr WLAN Netzwerk. + Die WirelessLan Erweiterung hilft Ihnen beim konfigurieren Ihres WLAN Netzwerkes.. + + + + + + + + diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_de.jpg b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_de.jpg new file mode 100755 index 0000000..3869541 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_de.jpg differ diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_en.jpg b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_en.jpg new file mode 100755 index 0000000..fe4fa97 Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_en.jpg differ diff --git a/lib/python/Screens/EpgSelection.py b/lib/python/Screens/EpgSelection.py index 3dde7e2..f8edba1 100644 --- a/lib/python/Screens/EpgSelection.py +++ b/lib/python/Screens/EpgSelection.py @@ -6,6 +6,7 @@ from Components.Label import Label from Components.EpgList import EPGList, EPG_TYPE_SINGLE, EPG_TYPE_SIMILAR, EPG_TYPE_MULTI from Components.ActionMap import ActionMap from Components.TimerSanityCheck import TimerSanityCheck +from Components.UsageConfig import preferredTimerPath from Components.Sources.ServiceEvent import ServiceEvent from Components.Sources.Event import Event from Screens.TimerEdit import TimerSanityConflict @@ -235,7 +236,7 @@ class EPGSelection(Screen): self.session.openWithCallback(cb_func, MessageBox, _("Do you really want to delete %s?") % event.getEventName()) break else: - newEntry = RecordTimerEntry(serviceref, checkOldTimers = True, *parseEvent(event)) + newEntry = RecordTimerEntry(serviceref, checkOldTimers = True, dirname = preferredTimerPath(), *parseEvent(event)) self.session.openWithCallback(self.finishedAdd, TimerEntry, newEntry) def finishedAdd(self, answer): diff --git a/lib/python/Screens/EventView.py b/lib/python/Screens/EventView.py index c1ffb58..cced3ce 100644 --- a/lib/python/Screens/EventView.py +++ b/lib/python/Screens/EventView.py @@ -6,6 +6,7 @@ from Components.Button import Button from Components.Label import Label from Components.ScrollLabel import ScrollLabel from Components.TimerList import TimerList +from Components.UsageConfig import preferredTimerPath from enigma import eEPGCache, eTimer, eServiceReference from RecordTimer import RecordTimerEntry, parseEvent, AFTEREVENT from TimerEntry import TimerEntry @@ -85,7 +86,7 @@ class EventViewBase: self.session.openWithCallback(cb_func, MessageBox, _("Do you really want to delete %s?") % event.getEventName()) break else: - newEntry = RecordTimerEntry(self.currentService, checkOldTimers = True, *parseEvent(self.event)) + newEntry = RecordTimerEntry(self.currentService, checkOldTimers = True, dirname = preferredTimerPath(), *parseEvent(self.event)) self.session.openWithCallback(self.finishedAdd, TimerEntry, newEntry) def finishedAdd(self, answer): diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 59cc21d..a15c7ac 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -212,7 +212,6 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ return if answer in ("quit", "quitanddeleteconfirmed"): - config.movielist.last_videodir.cancel() self.close() elif answer == "movielist": ref = self.session.nav.getCurrentlyPlayingServiceReference() diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 2cbfeb7..b672b68 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -10,6 +10,7 @@ from Components.ServiceEventTracker import ServiceEventTracker from Components.Sources.Boolean import Boolean from Components.config import config, ConfigBoolean, ConfigClock from Components.SystemInfo import SystemInfo +from Components.UsageConfig import preferredInstantRecordPath, defaultMoviePath from EpgSelection import EPGSelection from Plugins.Plugin import PluginDescriptor @@ -28,7 +29,7 @@ from Screens.TimeDateInput import TimeDateInput from ServiceReference import ServiceReference from Tools import Notifications -from Tools.Directories import SCOPE_HDD, resolveFilename, fileExists +from Tools.Directories import fileExists from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \ iPlayableService, eServiceReference, eEPGCache @@ -691,8 +692,6 @@ class InfoBarSeek: iPlayableService.evSOF: self.__evSOF, }) - self.minSpeedBackward = useSeekBackHack and 16 or 0 - class InfoBarSeekActionMap(HelpableActionMap): def __init__(self, screen, *args, **kwargs): HelpableActionMap.__init__(self, screen, *args, **kwargs) @@ -739,24 +738,19 @@ 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: +# 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) def makeStateBackward(self, n): - minspeed = config.seek.stepwise_minspeed.value - repeat = int(config.seek.stepwise_repeat.value) - if self.minSpeedBackward and n < self.minSpeedBackward: - r = (self.minSpeedBackward - 1)/ n + 1 - if minspeed != "Never" and n >= int(minspeed) and repeat > 1: - r = max(r, repeat) - return (0, -n * r, r, "<< %dx" % n) - elif minspeed != "Never" and n >= int(minspeed) and repeat > 1: - return (0, -n * repeat, repeat, "<< %dx" % n) - else: +# 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) def makeStateSlowMotion(self, n): @@ -876,7 +870,7 @@ class InfoBarSeek: if config.seek.on_pause.value == "play": self.unPauseService() elif config.seek.on_pause.value == "step": - self.doSeekRelative(0) + self.doSeekRelative(1) elif config.seek.on_pause.value == "last": self.setSeekState(self.lastseekstate) self.lastseekstate = self.SEEK_STATE_PLAY @@ -949,7 +943,7 @@ class InfoBarSeek: self.setSeekState(self.makeStateBackward(int(config.seek.enter_backward.value))) self.doSeekRelative(-6) elif seekstate == self.SEEK_STATE_PAUSE: - self.doSeekRelative(-3) + self.doSeekRelative(-1) elif self.isStateForward(seekstate): speed = seekstate[1] if seekstate[2]: @@ -1484,7 +1478,7 @@ class InfoBarInstantRecord: if isinstance(serviceref, eServiceReference): serviceref = ServiceReference(serviceref) - recording = RecordTimerEntry(serviceref, begin, end, name, description, eventid, dirname = config.movielist.last_videodir.value) + recording = RecordTimerEntry(serviceref, begin, end, name, description, eventid, dirname = preferredInstantRecordPath()) recording.dontSave = True if event is None or limitEvent == False: @@ -1585,9 +1579,9 @@ class InfoBarInstantRecord: self.session.nav.RecordTimer.timeChanged(entry) def instantRecord(self): - dir = config.movielist.last_videodir.value - if not fileExists(dir, 'w'): - dir = resolveFilename(SCOPE_HDD) + dir = preferredInstantRecordPath() + if not dir or not fileExists(dir, 'w'): + dir = defaultMoviePath() try: stat = os_stat(dir) except: @@ -1669,17 +1663,46 @@ class InfoBarAudioSelection: else: break + availableKeys = [] + usedKeys = [] + if SystemInfo["CanDownmixAC3"]: - tlist = [(_("AC3 downmix") + " - " +(_("Off"), _("On"))[config.av.downmix_ac3.value and 1 or 0], "CALLFUNC", self.changeAC3Downmix), - ((_("Left"), _("Stereo"), _("Right"))[self.audioChannel.getCurrentChannel()], "mode"), - ("--", "")] + tlist - keys = [ "red", "green", "", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] + [""]*n - selection += 3 - else: - tlist = [((_("Left"), _("Stereo"), _("Right"))[self.audioChannel.getCurrentChannel()], "mode"), ("--", "")] + tlist - keys = [ "red", "", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] + [""]*n + flist = [(_("AC3 downmix") + " - " +(_("Off"), _("On"))[config.av.downmix_ac3.value and 1 or 0], "CALLFUNC", self.changeAC3Downmix), + ((_("Left"), _("Stereo"), _("Right"))[self.audioChannel.getCurrentChannel()], "mode")] + usedKeys.extend(["red", "green"]) + availableKeys.extend(["yellow", "blue"]) selection += 2 - self.session.openWithCallback(self.audioSelected, ChoiceBox, title=_("Select audio track"), list = tlist, selection = selection, keys = keys, skin_name = "AudioTrackSelection") + else: + flist = [((_("Left"), _("Stereo"), _("Right"))[self.audioChannel.getCurrentChannel()], "mode")] + usedKeys.extend(["red"]) + availableKeys.extend(["green", "yellow", "blue"]) + selection += 1 + + if hasattr(self, "runPlugin"): + class PluginCaller: + def __init__(self, fnc, *args): + self.fnc = fnc + self.args = args + def __call__(self, *args, **kwargs): + self.fnc(*self.args) + + Plugins = [ (p.name, PluginCaller(self.runPlugin, p)) for p in plugins.getPlugins(where = PluginDescriptor.WHERE_AUDIOMENU) ] + + for p in Plugins: + selection += 1 + flist.append((p[0], "CALLFUNC", p[1])) + if availableKeys: + usedKeys.append(availableKeys[0]) + del availableKeys[0] + else: + usedKeys.append("") + + flist.append(("--", "")) + usedKeys.append("") + selection += 1 + + keys = usedKeys + [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" ] + [""] * n + self.session.openWithCallback(self.audioSelected, ChoiceBox, title=_("Select audio track"), list = flist + tlist, selection = selection, keys = keys, skin_name = "AudioTrackSelection") else: del self.audioTracks diff --git a/lib/python/Screens/LanguageSelection.py b/lib/python/Screens/LanguageSelection.py old mode 100644 new mode 100755 index 082daa5..fce10ac --- a/lib/python/Screens/LanguageSelection.py +++ b/lib/python/Screens/LanguageSelection.py @@ -13,14 +13,14 @@ def _cached(x): from Screens.Rc import Rc -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from Tools.LoadPixmap import LoadPixmap def LanguageEntryComponent(file, name, index): - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "countries/" + file + ".png")) + png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "countries/" + file + ".png")) if png == None: - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "countries/missing.png")) + png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "countries/missing.png")) res = (index, name, png) return res diff --git a/lib/python/Screens/LocationBox.py b/lib/python/Screens/LocationBox.py index 61d7105..29d94f5 100644 --- a/lib/python/Screens/LocationBox.py +++ b/lib/python/Screens/LocationBox.py @@ -289,6 +289,11 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen): else: self["filelist"].refresh() self.removeBookmark(name, True) + val = self.realBookmarks and self.realBookmarks.value + if val and name in val: + val.remove(name) + self.realBookmarks.value = val + self.realBookmarks.save() def up(self): self[self.currList].up() diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 44994b8..585983c 100755 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -14,5 +14,5 @@ install_PYTHON = \ SubtitleDisplay.py SubservicesQuickzap.py ParentalControlSetup.py NumericalTextInputHelpDialog.py \ SleepTimerEdit.py Ipkg.py RdsDisplay.py Globals.py DefaultWizard.py \ SessionGlobals.py LocationBox.py WizardLanguage.py TaskView.py Rc.py VirtualKeyBoard.py \ - TextBox.py FactoryReset.py + TextBox.py FactoryReset.py RecordPaths.py diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index 5f2032f..bb0709e 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -97,8 +97,12 @@ class Menu(Screen): def addMenu(self, destList, node): requires = node.get("requires") - if requires and not SystemInfo.get(requires, False): - return + if requires: + if requires[0] == '!': + if SystemInfo.get(requires[1:], False): + return + elif not SystemInfo.get(requires, False): + return MenuTitle = _(node.get("text", "??").encode("UTF-8")) entryID = node.get("entryID", "undefined") weight = node.get("weight", 50) @@ -120,8 +124,12 @@ class Menu(Screen): def addItem(self, destList, node): requires = node.get("requires") - if requires and not SystemInfo.get(requires, False): - return + if requires: + if requires[0] == '!': + if SystemInfo.get(requires[1:], False): + return + elif not SystemInfo.get(requires, False): + return item_text = node.get("text", "").encode("UTF-8") entryID = node.get("entryID", "undefined") weight = node.get("weight", 50) diff --git a/lib/python/Screens/MessageBox.py b/lib/python/Screens/MessageBox.py index 86bf07d..f3538b7 100644 --- a/lib/python/Screens/MessageBox.py +++ b/lib/python/Screens/MessageBox.py @@ -12,9 +12,11 @@ class MessageBox(Screen): TYPE_WARNING = 2 TYPE_ERROR = 3 - def __init__(self, session, text, type = TYPE_YESNO, timeout = -1, close_on_any_key = False, default = True, enable_input = True): + def __init__(self, session, text, type = TYPE_YESNO, timeout = -1, close_on_any_key = False, default = True, enable_input = True, msgBoxID = None): self.type = type Screen.__init__(self, session) + + self.msgBoxID = msgBoxID self["text"] = Label(text) self["Text"] = StaticText(text) diff --git a/lib/python/Screens/MovieSelection.py b/lib/python/Screens/MovieSelection.py index 174a4f0..15f6b46 100644 --- a/lib/python/Screens/MovieSelection.py +++ b/lib/python/Screens/MovieSelection.py @@ -7,8 +7,9 @@ from Components.DiskInfo import DiskInfo from Components.Pixmap import Pixmap from Components.Label import Label from Components.PluginComponent import plugins -from Components.config import config, ConfigSubsection, ConfigText, ConfigInteger, ConfigLocations +from Components.config import config, ConfigSubsection, ConfigText, ConfigInteger, ConfigLocations, ConfigSet from Components.Sources.ServiceEvent import ServiceEvent +from Components.UsageConfig import defaultMoviePath from Plugins.Plugin import PluginDescriptor @@ -31,6 +32,7 @@ config.movielist.last_timer_videodir = ConfigText(default=resolveFilename(SCOPE_ config.movielist.videodirs = ConfigLocations(default=[resolveFilename(SCOPE_HDD)]) config.movielist.first_tags = ConfigText(default="") config.movielist.second_tags = ConfigText(default="") +config.movielist.last_selected_tags = ConfigSet([], default=[]) def setPreferredTagEditor(te): @@ -168,7 +170,10 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): HelpableScreen.__init__(self) self.tags = [ ] - self.selected_tags = None + if selectedmovie: + self.selected_tags = config.movielist.last_selected_tags.value + else: + self.selected_tags = None self.selected_tags_ele = None self.movemode = False @@ -183,8 +188,8 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): self["DescriptionBorder"] = Pixmap() self["DescriptionBorder"].hide() - if not pathExists(config.movielist.last_videodir.value): - config.movielist.last_videodir.value = resolveFilename(SCOPE_HDD) + if not fileExists(config.movielist.last_videodir.value): + config.movielist.last_videodir.value = defaultMoviePath() config.movielist.last_videodir.save() self.current_ref = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + config.movielist.last_videodir.value) @@ -292,6 +297,7 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): self.close(None) def saveconfig(self): + config.movielist.last_selected_tags.value = self.selected_tags config.movielist.moviesort.save() config.movielist.listtype.save() config.movielist.description.save() @@ -339,8 +345,8 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): self["list"].setSortType(type) def reloadList(self, sel = None, home = False): - if not pathExists(config.movielist.last_videodir.value): - path = resolveFilename(SCOPE_HDD) + if not fileExists(config.movielist.last_videodir.value): + path = defaultMoviePath() config.movielist.last_videodir.value = path config.movielist.last_videodir.save() self.current_ref = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + path) @@ -370,7 +376,7 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): def gotFilename(self, res): if res is not None and res is not config.movielist.last_videodir.value: - if pathExists(res): + if fileExists(res): config.movielist.last_videodir.value = res config.movielist.last_videodir.save() self.current_ref = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + res) @@ -392,7 +398,7 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): def showTagsN(self, tagele): if not self.tags: self.showTagWarning() - elif not tagele or self.selected_tags_ele == tagele or not tagele.value in self.tags: + elif not tagele or tagele.value in self.selected_tags or not tagele.value in self.tags: self.showTagsMenu(tagele) else: self.selected_tags_ele = tagele diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py index ec2bafe..92416a3 100755 --- a/lib/python/Screens/NetworkSetup.py +++ b/lib/python/Screens/NetworkSetup.py @@ -6,6 +6,7 @@ from Screens.VirtualKeyBoard import VirtualKeyBoard from Screens.HelpMenu import HelpableScreen from Components.Network import iNetwork from Components.Sources.StaticText import StaticText +from Components.Sources.Boolean import Boolean from Components.Label import Label,MultiColorLabel from Components.Pixmap import Pixmap,MultiPixmap from Components.MenuList import MenuList @@ -14,7 +15,7 @@ from Components.ConfigList import ConfigListScreen from Components.PluginComponent import plugins from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap -from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_SKIN from Tools.LoadPixmap import LoadPixmap from Plugins.Plugin import PluginDescriptor from enigma import eTimer, ePoint, eSize, RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont @@ -36,14 +37,14 @@ def InterfaceEntryComponent(index,name,default,active ): num_configured_if = len(iNetwork.getConfiguredAdapters()) if num_configured_if >= 2: if default is True: - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/buttons/button_blue.png")) + png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue.png")) if default is False: - png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/buttons/button_blue_off.png")) + png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue_off.png")) res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 5), size=(25, 25), png = png)) if active is True: - png2 = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_on.png")) + png2 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_on.png")) if active is False: - png2 = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_error.png")) + png2 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_error.png")) res.append(MultiContentEntryPixmapAlphaTest(pos=(40, 1), size=(25, 25), png = png2)) return res @@ -319,11 +320,6 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): "blue": (self.KeyBlue, _("open nameserver configuration")), }) - self["VirtualKB"] = HelpableActionMap(self, "VirtualKeyboardActions", - { - "showVirtualKeyboard": (self.KeyText, [_("open virtual keyboard input help"),_("* Only available when entering hidden SSID or network key")] ), - }) - self["actions"] = NumberActionMap(["SetupActions"], { "ok": self.ok, @@ -355,9 +351,10 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): self["key_red"] = StaticText(_("Cancel")) self["key_blue"] = StaticText(_("Edit DNS")) - self["VKeyIcon"] = Pixmap() + self["VKeyIcon"] = Boolean(False) self["HelpWindow"] = Pixmap() - + self["HelpWindow"].hide() + def layoutFinished(self): self["DNS1"].setText(self.primaryDNS.getText()) self["DNS2"].setText(self.secondaryDNS.getText()) @@ -386,9 +383,6 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): self["Gateway"].setText("") self["Gatewaytext"].setText("") self["Adapter"].setText(iNetwork.getFriendlyAdapterName(self.iface)) - self["VKeyIcon"].hide() - self["VirtualKB"].setEnabled(False) - self["HelpWindow"].hide() def createConfig(self): self.InterfaceEntry = None @@ -518,30 +512,10 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): self["config"].list = self.list self["config"].l.setList(self.list) - if not self.selectionChanged in self["config"].onSelectionChanged: - self["config"].onSelectionChanged.append(self.selectionChanged) def KeyBlue(self): self.session.openWithCallback(self.NameserverSetupClosed, NameserverSetup) - def KeyText(self): - if self.iface == "wlan0" or self.iface == "ath0" : - if self["config"].getCurrent() == self.hiddenSSID: - if config.plugins.wlan.essid.value == 'hidden...': - self.session.openWithCallback(self.VirtualKeyBoardSSIDCallback, VirtualKeyBoard, title = (_("Enter WLAN network name/SSID:")), text = config.plugins.wlan.essid.value) - if self["config"].getCurrent() == self.encryptionKey: - self.session.openWithCallback(self.VirtualKeyBoardKeyCallback, VirtualKeyBoard, title = (_("Enter WLAN passphrase/key:")), text = config.plugins.wlan.encryption.psk.value) - - def VirtualKeyBoardSSIDCallback(self, callback = None): - if callback is not None and len(callback): - config.plugins.wlan.hiddenessid.setValue(callback) - self["config"].invalidate(self.hiddenSSID) - - def VirtualKeyBoardKeyCallback(self, callback = None): - if callback is not None and len(callback): - config.plugins.wlan.encryption.psk.setValue(callback) - self["config"].invalidate(self.encryptionKey) - def newConfig(self): if self["config"].getCurrent() == self.InterfaceEntry: self.createSetup() @@ -565,24 +539,6 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): ConfigListScreen.keyRight(self) self.newConfig() - def selectionChanged(self): - current = self["config"].getCurrent() - if current == self.hiddenSSID and config.plugins.wlan.essid.value == 'hidden...': - helpwindowpos = self["HelpWindow"].getPosition() - if current[1].help_window.instance is not None: - current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) - self["VKeyIcon"].show() - self["VirtualKB"].setEnabled(True) - elif current == self.encryptionKey and config.plugins.wlan.encryption.enabled.value: - helpwindowpos = self["HelpWindow"].getPosition() - if current[1].help_window.instance is not None: - current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) - self["VKeyIcon"].show() - self["VirtualKB"].setEnabled(True) - else: - self["VKeyIcon"].hide() - self["VirtualKB"].setEnabled(False) - def ok(self): current = self["config"].getCurrent() if current == self.hiddenSSID and config.plugins.wlan.essid.value == 'hidden...': diff --git a/lib/python/Screens/PluginBrowser.py b/lib/python/Screens/PluginBrowser.py index 3a7df9f..61bb7d0 100755 --- a/lib/python/Screens/PluginBrowser.py +++ b/lib/python/Screens/PluginBrowser.py @@ -1,5 +1,5 @@ from Screen import Screen - +from Components.Language import language from enigma import eConsoleAppContainer from Components.ActionMap import ActionMap @@ -14,6 +14,10 @@ from Tools.LoadPixmap import LoadPixmap from time import time +def languageChanged(): + plugins.clearPluginList() + plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) + class PluginBrowser(Screen): def __init__(self, session): Screen.__init__(self, session) @@ -226,3 +230,4 @@ class PluginDownloadBrowser(Screen): self.list = list self["list"].l.setList(list) +language.addCallback(languageChanged) \ No newline at end of file diff --git a/lib/python/Screens/RdsDisplay.py b/lib/python/Screens/RdsDisplay.py old mode 100644 new mode 100755 index 36d4590..0b99584 --- a/lib/python/Screens/RdsDisplay.py +++ b/lib/python/Screens/RdsDisplay.py @@ -4,7 +4,7 @@ from Components.ActionMap import NumberActionMap from Components.ServiceEventTracker import ServiceEventTracker from Components.Pixmap import Pixmap from Components.Label import Label -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from Tools.LoadPixmap import LoadPixmap class RdsInfoDisplay(Screen): @@ -122,10 +122,10 @@ class RassInteractive(Screen): 9 : self["subpages_9"] } self.subpage_png = { - 1 : LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/rass_page1.png")), - 2 : LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/rass_page2.png")), - 3 : LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/rass_page3.png")), - 4 : LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/rass_page4.png")) } + 1 : LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/rass_page1.png")), + 2 : LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/rass_page2.png")), + 3 : LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/rass_page3.png")), + 4 : LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/rass_page4.png")) } self.current_page=0; self.current_subpage=0; diff --git a/lib/python/Screens/RecordPaths.py b/lib/python/Screens/RecordPaths.py new file mode 100644 index 0000000..c833266 --- /dev/null +++ b/lib/python/Screens/RecordPaths.py @@ -0,0 +1,194 @@ +from Screens.Screen import Screen +from Screens.LocationBox import MovieLocationBox, TimeshiftLocationBox +from Screens.MessageBox import MessageBox +from Components.Label import Label +from Components.config import config, ConfigSelection, getConfigListEntry, configfile +from Components.ConfigList import ConfigListScreen +from Components.ActionMap import ActionMap +from Tools.Directories import fileExists + + +class RecordPathsSettings(Screen,ConfigListScreen): + skin = """ + + + + + + + """ + + def __init__(self, session): + from Components.Sources.StaticText import StaticText + Screen.__init__(self, session) + self["key_red"] = StaticText(_("Cancel")) + self["key_green"] = StaticText(_("Save")) + + ConfigListScreen.__init__(self, []) + self.initConfigList() + + self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], + { + "green": self.save, + "red": self.cancel, + "cancel": self.cancel, + "ok": self.ok, + }, -2) + + def checkReadWriteDir(self, configele): + print "checkReadWrite: ", configele.value + if configele.value in [x[0] for x in self.styles] or fileExists(configele.value, "w"): + configele.last_value = configele.value + return True + else: + dir = configele.value + configele.value = configele.last_value + self.session.open( + MessageBox, + _("The directory %s is not writable.\nMake sure you select a writable directory instead.")%dir, + type = MessageBox.TYPE_ERROR + ) + return False + + def initConfigList(self): + self.styles = [ ("", _("")), ("", _("")), ("", _("")) ] + styles_keys = [x[0] for x in self.styles] + tmp = config.movielist.videodirs.value + default = config.usage.default_path.value + if default not in tmp: + tmp = tmp[:] + tmp.append(default) + print "DefaultPath: ", default, tmp + self.default_dirname = ConfigSelection(default = default, choices = tmp) + tmp = config.movielist.videodirs.value + default = config.usage.timer_path.value + if default not in tmp and default not in styles_keys: + tmp = tmp[:] + tmp.append(default) + print "TimerPath: ", default, tmp + self.timer_dirname = ConfigSelection(default = default, choices = self.styles+tmp) + tmp = config.movielist.videodirs.value + default = config.usage.instantrec_path.value + if default not in tmp and default not in styles_keys: + tmp = tmp[:] + tmp.append(default) + print "InstantrecPath: ", default, tmp + self.instantrec_dirname = ConfigSelection(default = default, choices = self.styles+tmp) + default = config.usage.timeshift_path.value + tmp = config.usage.allowed_timeshift_paths.value + if default not in tmp: + tmp = tmp[:] + tmp.append(default) + print "TimeshiftPath: ", default, tmp + self.timeshift_dirname = ConfigSelection(default = default, choices = tmp) + self.default_dirname.addNotifier(self.checkReadWriteDir, initial_call=False, immediate_feedback=False) + self.timer_dirname.addNotifier(self.checkReadWriteDir, initial_call=False, immediate_feedback=False) + self.instantrec_dirname.addNotifier(self.checkReadWriteDir, initial_call=False, immediate_feedback=False) + self.timeshift_dirname.addNotifier(self.checkReadWriteDir, initial_call=False, immediate_feedback=False) + + self.list = [] + if config.usage.setup_level.index >= 2: + self.default_entry = getConfigListEntry(_("Default movie location"), self.default_dirname) + self.list.append(self.default_entry) + self.timer_entry = getConfigListEntry(_("Timer record location"), self.timer_dirname) + self.list.append(self.timer_entry) + self.instantrec_entry = getConfigListEntry(_("Instant record location"), self.instantrec_dirname) + self.list.append(self.instantrec_entry) + else: + self.default_entry = getConfigListEntry(_("Movie location"), self.default_dirname) + self.list.append(self.default_entry) + self.timeshift_entry = getConfigListEntry(_("Timeshift location"), self.timeshift_dirname) + self.list.append(self.timeshift_entry) + self["config"].setList(self.list) + + def ok(self): + currentry = self["config"].getCurrent() + self.lastvideodirs = config.movielist.videodirs.value + self.lasttimeshiftdirs = config.usage.allowed_timeshift_paths.value + if config.usage.setup_level.index >= 2: + txt = _("Default movie location") + else: + txt = _("Movie location") + if currentry == self.default_entry: + self.entrydirname = self.default_dirname + self.session.openWithCallback( + self.dirnameSelected, + MovieLocationBox, + txt, + self.default_dirname.value + ) + elif currentry == self.timer_entry: + self.entrydirname = self.timer_dirname + self.session.openWithCallback( + self.dirnameSelected, + MovieLocationBox, + _("Initial location in new timers"), + self.timer_dirname.value + ) + elif currentry == self.instantrec_entry: + self.entrydirname = self.instantrec_dirname + self.session.openWithCallback( + self.dirnameSelected, + MovieLocationBox, + _("Location for instant recordings"), + self.instantrec_dirname.value + ) + elif currentry == self.timeshift_entry: + self.entrydirname = self.timeshift_dirname + config.usage.timeshift_path.value = self.timeshift_dirname.value + self.session.openWithCallback( + self.dirnameSelected, + TimeshiftLocationBox + ) + + def dirnameSelected(self, res): + if res is not None: + self.entrydirname.value = res + if config.movielist.videodirs.value != self.lastvideodirs: + styles_keys = [x[0] for x in self.styles] + tmp = config.movielist.videodirs.value + default = self.default_dirname.value + if default not in tmp: + tmp = tmp[:] + tmp.append(default) + self.default_dirname.setChoices(tmp, default=default) + tmp = config.movielist.videodirs.value + default = self.timer_dirname.value + if default not in tmp and default not in styles_keys: + tmp = tmp[:] + tmp.append(default) + self.timer_dirname.setChoices(self.styles+tmp, default=default) + tmp = config.movielist.videodirs.value + default = self.instantrec_dirname.value + if default not in tmp and default not in styles_keys: + tmp = tmp[:] + tmp.append(default) + self.instantrec_dirname.setChoices(self.styles+tmp, default=default) + self.entrydirname.value = res + if config.usage.allowed_timeshift_paths.value != self.lasttimeshiftdirs: + tmp = config.usage.allowed_timeshift_paths.value + default = self.instantrec_dirname.value + if default not in tmp: + tmp = tmp[:] + tmp.append(default) + self.timeshift_dirname.setChoices(tmp, default=default) + self.entrydirname.value = res + if self.entrydirname.last_value != res: + self.checkReadWriteDir(self.entrydirname) + + def save(self): + currentry = self["config"].getCurrent() + if self.checkReadWriteDir(currentry[1]): + config.usage.default_path.value = self.default_dirname.value + config.usage.timer_path.value = self.timer_dirname.value + config.usage.instantrec_path.value = self.instantrec_dirname.value + config.usage.timeshift_path.value = self.timeshift_dirname.value + config.usage.default_path.save() + config.usage.timer_path.save() + config.usage.instantrec_path.save() + config.usage.timeshift_path.save() + self.close() + + def cancel(self): + self.close() + diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 8b5089a..e24e463 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -8,6 +8,7 @@ from Components.NimManager import nimmanager from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement from Components.Sources.List import List from Screens.MessageBox import MessageBox +from Screens.ChoiceBox import ChoiceBox from time import mktime, localtime from datetime import datetime @@ -342,10 +343,10 @@ class NimSetup(Screen, ConfigListScreen): new_configured_sats = nimmanager.getConfiguredSats() self.unconfed_sats = old_configured_sats - new_configured_sats self.satpos_to_remove = None - self.deleteConfirmed(False) + self.deleteConfirmed((None, "no")) def deleteConfirmed(self, confirmed): - if confirmed: + if confirmed[1] == "yes" or confirmed[1] == "yestoall": eDVBDB.getInstance().removeServices(-1, -1, -1, self.satpos_to_remove) if self.satpos_to_remove is not None: @@ -365,11 +366,15 @@ class NimSetup(Screen, ConfigListScreen): else: h = _("E") sat_name = ("%d.%d" + h) % (orbpos / 10, orbpos % 10) - self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Delete no more configured satellite\n%s?") %(sat_name)) + + if confirmed[1] == "yes" or confirmed[1] == "no": + self.session.openWithCallback(self.deleteConfirmed, ChoiceBox, _("Delete no more configured satellite\n%s?") %(sat_name), [(_("Yes"), "yes"), (_("No"), "no"), (_("Yes to all"), "yestoall"), (_("No to all"), "notoall")]) + if confirmed[1] == "yestoall" or confirmed[1] == "notoall": + self.deleteConfirmed(confirmed) break if not self.satpos_to_remove: self.close() - + def __init__(self, session, slotid): Screen.__init__(self, session) self.list = [ ] diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index bea0872..fa787a7 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -524,6 +524,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): for n in nimmanager.nim_slots: if n.config_mode == "nothing": continue + if n.config_mode == "advanced" and len(nimmanager.getSatListForNim(n.slot)) < 1: + continue if n.config_mode in ("loopthrough", "satposdepends"): root_id = nimmanager.sec.getRoot(n.slot_id, int(n.config.connectedTo.value)) if n.type == nimmanager.nim_slots[root_id].type: # check if connected from a DVB-S to DVB-S2 Nim or vice versa diff --git a/lib/python/Screens/Scart.py b/lib/python/Screens/Scart.py index dc51144..00e7859 100644 --- a/lib/python/Screens/Scart.py +++ b/lib/python/Screens/Scart.py @@ -1,10 +1,13 @@ from Screen import Screen from MessageBox import MessageBox from Components.AVSwitch import AVSwitch +from Tools import Notifications class Scart(Screen): def __init__(self, session, start_visible=True): Screen.__init__(self, session) + self.msgBox = None + self.notificationVisible = None self.avswitch = AVSwitch() @@ -22,7 +25,11 @@ class Scart(Screen): if not self.msgVisible: self.msgVisible = True self.avswitch.setInput("SCART") - self.msgBox = self.session.openWithCallback(self.MsgBoxClosed, MessageBox, _("If you see this, something is wrong with\nyour scart connection. Press OK to return."), MessageBox.TYPE_ERROR) + if not self.session.in_exec: + self.notificationVisible = True + Notifications.AddNotificationWithCallback(self.MsgBoxClosed, MessageBox, _("If you see this, something is wrong with\nyour scart connection. Press OK to return."), MessageBox.TYPE_ERROR, msgBoxID = "scart_msgbox") + else: + self.msgBox = self.session.openWithCallback(self.MsgBoxClosed, MessageBox, _("If you see this, something is wrong with\nyour scart connection. Press OK to return."), MessageBox.TYPE_ERROR) def MsgBoxClosed(self, *val): self.msgBox = None @@ -35,3 +42,13 @@ class Scart(Screen): return self.avswitch.setInput("ENCODER") self.msgVisible = False + if self.notificationVisible: + self.avswitch.setInput("ENCODER") + self.notificationVisible = False + for notification in Notifications.current_notifications: + try: + if notification[1].msgBoxID == "scart_msgbox": + notification[1].close() + except: + print "other notification is open. try another one." + \ No newline at end of file diff --git a/lib/python/Screens/SleepTimerEdit.py b/lib/python/Screens/SleepTimerEdit.py index ff061d8..e5e7af4 100644 --- a/lib/python/Screens/SleepTimerEdit.py +++ b/lib/python/Screens/SleepTimerEdit.py @@ -5,6 +5,7 @@ from Components.Input import Input from Components.Label import Label from Components.Pixmap import Pixmap from Components.config import config, ConfigInteger +from Components.SystemInfo import SystemInfo from enigma import eEPGCache from SleepTimer import SleepTimer from time import time @@ -77,7 +78,11 @@ class SleepTimerEdit(Screen): self["red_text"].setText(_("Action:") + " " + _("Disable timer")) if config.SleepTimer.action.value == "shutdown": - self["green_text"].setText(_("Sleep timer action:") + " " + _("Deep Standby")) + if SystemInfo["DeepstandbySupport"]: + shutdownString = _("Deep Standby") + else: + shutdownString = _("Shutdown") + self["green_text"].setText(_("Sleep timer action:") + " " + shutdownString) elif config.SleepTimer.action.value == "standby": self["green_text"].setText(_("Sleep timer action:") + " " + _("Standby")) diff --git a/lib/python/Screens/TaskView.py b/lib/python/Screens/TaskView.py index 1453c05..eb926ca 100644 --- a/lib/python/Screens/TaskView.py +++ b/lib/python/Screens/TaskView.py @@ -1,6 +1,7 @@ from Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigSelection, getConfigListEntry +from Components.SystemInfo import SystemInfo from InfoBarGenerics import InfoBarNotifications import Screens.Standby from Tools import Notifications @@ -44,7 +45,11 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen): self.afterevents = [ "nothing", "standby", "deepstandby", "close" ] self.settings = ConfigSubsection() - self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", _("go to deep standby"))], default = self.afterevents[afterEvent]) + if SystemInfo["DeepstandbySupport"]: + shutdownString = _("go to deep standby") + else: + shutdownString = _("shut down") + self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", shutdownString)], default = self.afterevents[afterEvent]) self.setupList() self.state_changed() diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index caaf8c9..5435498 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -4,6 +4,7 @@ from Components.config import config from Components.MenuList import MenuList from Components.TimerList import TimerList from Components.TimerSanityCheck import TimerSanityCheck +from Components.UsageConfig import preferredTimerPath from RecordTimer import RecordTimerEntry, parseEvent, AFTEREVENT from Screen import Screen from Screens.ChoiceBox import ChoiceBox @@ -243,7 +244,7 @@ class TimerEditList(Screen): else: data = parseEvent(event, description = False) - self.addTimer(RecordTimerEntry(serviceref, checkOldTimers = True, dirname = config.movielist.last_timer_videodir.value, *data)) + self.addTimer(RecordTimerEntry(serviceref, checkOldTimers = True, dirname = preferredTimerPath(), *data)) def addTimer(self, timer): self.session.openWithCallback(self.finishedAdd, TimerEntry, timer) diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index edd1968..42a3195 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -8,11 +8,12 @@ from Components.MenuList import MenuList from Components.Button import Button from Components.Label import Label from Components.Pixmap import Pixmap +from Components.UsageConfig import defaultMoviePath +from Components.SystemInfo import SystemInfo from Screens.MovieSelection import getPreferredTagEditor from Screens.LocationBox import MovieLocationBox from Screens.ChoiceBox import ChoiceBox from RecordTimer import AFTEREVENT -from Tools.Directories import resolveFilename, SCOPE_HDD from enigma import eEPGCache from time import localtime, mktime, time, strftime from datetime import datetime @@ -93,7 +94,11 @@ class TimerEntry(Screen, ConfigListScreen): day[weekday] = 1 self.timerentry_justplay = ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "zap"}[justplay]) - self.timerentry_afterevent = ConfigSelection(choices = [("nothing", _("do nothing")), ("standby", _("go to standby")), ("deepstandby", _("go to deep standby")), ("auto", _("auto"))], default = afterevent) + if SystemInfo["DeepstandbySupport"]: + shutdownString = _("go to deep standby") + else: + shutdownString = _("shut down") + self.timerentry_afterevent = ConfigSelection(choices = [("nothing", _("do nothing")), ("standby", _("go to standby")), ("deepstandby", shutdownString), ("auto", _("auto"))], default = afterevent) self.timerentry_type = ConfigSelection(choices = [("once",_("once")), ("repeated", _("repeated"))], default = type) self.timerentry_name = ConfigText(default = self.timer.name, visible_width = 50, fixed_size = False) self.timerentry_description = ConfigText(default = self.timer.description, visible_width = 50, fixed_size = False) @@ -106,7 +111,7 @@ class TimerEntry(Screen, ConfigListScreen): self.timerentry_starttime = ConfigClock(default = self.timer.begin) self.timerentry_endtime = ConfigClock(default = self.timer.end) - default = self.timer.dirname or resolveFilename(SCOPE_HDD) + default = self.timer.dirname or defaultMoviePath() tmp = config.movielist.videodirs.value if default not in tmp: tmp.append(default) @@ -273,9 +278,10 @@ class TimerEntry(Screen, ConfigListScreen): self.timer.service_ref = self.timerentry_service_ref self.timer.tags = self.timerentry_tags - self.timer.dirname = self.timerentry_dirname.value - config.movielist.last_timer_videodir.value = self.timer.dirname - config.movielist.last_timer_videodir.save() + if self.timer.dirname or self.timerentry_dirname.value != defaultMoviePath(): + self.timer.dirname = self.timerentry_dirname.value + config.movielist.last_timer_videodir.value = self.timer.dirname + config.movielist.last_timer_videodir.save() if self.timerentry_type.value == "once": self.timer.begin, self.timer.end = self.getBeginEnd() diff --git a/lib/python/Screens/VirtualKeyBoard.py b/lib/python/Screens/VirtualKeyBoard.py index 19500ed..7846e4b 100755 --- a/lib/python/Screens/VirtualKeyBoard.py +++ b/lib/python/Screens/VirtualKeyBoard.py @@ -7,26 +7,25 @@ from Components.MenuList import MenuList from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_CENTER, RT_VALIGN_CENTER from Screen import Screen -from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE +from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from Tools.LoadPixmap import LoadPixmap class VirtualKeyBoardList(MenuList): def __init__(self, list, enableWrapAround=False): MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent) - self.l.setFont(0, gFont("Regular", 22)) + self.l.setFont(0, gFont("Regular", 28)) self.l.setItemHeight(45) def VirtualKeyBoardEntryComponent(keys, selectedKey,shiftMode=False): - key_backspace = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_backspace.png")) - key_bg = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_bg.png")) - key_clr = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_clr.png")) - key_esc = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_esc.png")) - key_ok = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_ok.png")) - key_sel = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_sel.png")) - key_shift = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_shift.png")) - key_shift_sel = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_shift_sel.png")) - key_space = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_space.png")) - + key_backspace = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_backspace.png")) + key_bg = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_bg.png")) + key_clr = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_clr.png")) + key_esc = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_esc.png")) + key_ok = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_ok.png")) + key_sel = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_sel.png")) + key_shift = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_shift.png")) + key_shift_sel = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_shift_sel.png")) + key_space = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/vkey_space.png")) res = [ (keys) ] x = 0 @@ -36,33 +35,45 @@ def VirtualKeyBoardEntryComponent(keys, selectedKey,shiftMode=False): else: shiftkey_png = key_shift for key in keys: + width = None if key == "EXIT": - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_esc)) + width = key_esc.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_esc)) elif key == "BACKSPACE": - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_backspace)) + width = key_backspace.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_backspace)) elif key == "CLEAR": - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_clr)) + width = key_clr.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_clr)) elif key == "SHIFT": - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=shiftkey_png)) + width = shiftkey_png.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=shiftkey_png)) elif key == "SPACE": - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_space)) + width = key_space.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_space)) elif key == "OK": - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_ok)) + width = key_ok.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_ok)) #elif key == "<-": # res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_left)) #elif key == "->": # res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_right)) else: + width = key_bg.size().width() res.extend(( - MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_bg), - MultiContentEntryText(pos=(x, 0), size=(45, 45), font=0, text=key.encode("utf-8"), flags=RT_HALIGN_CENTER | RT_VALIGN_CENTER) + MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_bg), + MultiContentEntryText(pos=(x, 0), size=(width, 45), font=0, text=key.encode("utf-8"), flags=RT_HALIGN_CENTER | RT_VALIGN_CENTER) )) if selectedKey == count: - res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(45, 45), png=key_sel)) - - x += 45 + width = key_sel.size().width() + res.append(MultiContentEntryPixmapAlphaTest(pos=(x, 0), size=(width, 45), png=key_sel)) + + if width is not None: + x += width + else: + x += 45 count += 1 return res diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py index 74219eb..1bff028 100755 --- a/lib/python/Screens/Wizard.py +++ b/lib/python/Screens/Wizard.py @@ -1,16 +1,15 @@ from Screen import Screen - from Screens.HelpMenu import HelpableScreen from Screens.MessageBox import MessageBox -from Components.config import config, KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS +from Components.config import config, ConfigText, ConfigPassword, KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS from Components.Label import Label +from Components.Sources.StaticText import StaticText from Components.Slider import Slider from Components.ActionMap import NumberActionMap from Components.MenuList import MenuList from Components.ConfigList import ConfigList from Components.Sources.List import List - from enigma import eTimer from xml.sax import make_parser @@ -19,8 +18,8 @@ from xml.sax.handler import ContentHandler class WizardSummary(Screen): skin = """ - - + + """ @@ -36,7 +35,7 @@ class WizardSummary(Screen): #self.skinName.append("Wizard") #print "*************+++++++++++++++++****************++++++++++******************* WizardSummary", self.skinName # - self["text"] = Label("") + self["text"] = StaticText("") self.onShow.append(self.setCallback) def setCallback(self): @@ -214,12 +213,13 @@ class Wizard(Screen): self.onShown.append(self.updateValues) self.configInstance = None + self.currentConfigIndex = None self.lcdCallbacks = [] self.disableKeys = False - self["actions"] = NumberActionMap(["WizardActions", "NumberActions", "ColorActions", "SetupActions", "InputAsciiActions"], + self["actions"] = NumberActionMap(["WizardActions", "NumberActions", "ColorActions", "SetupActions", "InputAsciiActions", "KeyboardInputActions"], { "gotAsciiCode": self.keyGotAscii, "ok": self.ok, @@ -245,6 +245,13 @@ class Wizard(Screen): "9": self.keyNumberGlobal, "0": self.keyNumberGlobal }, -1) + + self["VirtualKB"] = NumberActionMap(["VirtualKeyboardActions"], + { + "showVirtualKeyboard": self.KeyText, + }, -2) + + self["VirtualKB"].setEnabled(False) def red(self): print "red" @@ -405,6 +412,7 @@ class Wizard(Screen): self.resetCounter() if (self.showConfig and self.wizard[self.currStep]["config"]["screen"] != None or self.wizard[self.currStep]["config"]["type"] == "dynamic"): self["config"].instance.moveSelection(self["config"].instance.moveUp) + self.handleInputHelpers() elif (self.showList and len(self.wizard[self.currStep]["evaluatedlist"]) > 0): self["list"].selectPrevious() if self.wizard[self.currStep].has_key("onselect"): @@ -418,6 +426,7 @@ class Wizard(Screen): self.resetCounter() if (self.showConfig and self.wizard[self.currStep]["config"]["screen"] != None or self.wizard[self.currStep]["config"]["type"] == "dynamic"): self["config"].instance.moveSelection(self["config"].instance.moveDown) + self.handleInputHelpers() elif (self.showList and len(self.wizard[self.currStep]["evaluatedlist"]) > 0): #self["list"].instance.moveSelection(self["list"].instance.moveDown) self["list"].selectNext() @@ -598,6 +607,9 @@ class Wizard(Screen): print "clearConfigList", self.configInstance["config"], self["config"] else: self["config"].l.setList([]) + self.handleInputHelpers() + + else: if self.has_key("config"): self["config"].hide() @@ -614,6 +626,45 @@ class Wizard(Screen): self.finished(gotoStep = self.wizard[self.currStep]["timeoutstep"]) self.updateText() + def handleInputHelpers(self): + if self["config"].getCurrent() is not None: + if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword): + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(True) + self["VKeyIcon"].boolean = True + if self.has_key("HelpWindow"): + if self["config"].getCurrent()[1].help_window.instance is not None: + helpwindowpos = self["HelpWindow"].getPosition() + from enigma import ePoint + self["config"].getCurrent()[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) + else: + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(False) + self["VKeyIcon"].boolean = False + else: + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(False) + self["VKeyIcon"].boolean = False + + def KeyText(self): + from Screens.VirtualKeyBoard import VirtualKeyBoard + self.currentConfigIndex = self["config"].getCurrentIndex() + self.session.openWithCallback(self.VirtualKeyBoardCallback, VirtualKeyBoard, title = self["config"].getCurrent()[0], text = self["config"].getCurrent()[1].getValue()) + + def VirtualKeyBoardCallback(self, callback = None): + if callback is not None and len(callback): + if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword): + if self.has_key("HelpWindow"): + if self["config"].getCurrent()[1].help_window.instance is not None: + helpwindowpos = self["HelpWindow"].getPosition() + from enigma import ePoint + self["config"].getCurrent()[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) + self["config"].instance.moveSelectionTo(self.currentConfigIndex) + self["config"].setCurrentIndex(self.currentConfigIndex) + self["config"].getCurrent()[1].setValue(callback) + self["config"].invalidate(self["config"].getCurrent()) + + class WizardManager: def __init__(self): self.wizards = [] diff --git a/lib/python/Tools/Directories.py b/lib/python/Tools/Directories.py index 681bc04..8ed2c8a 100755 --- a/lib/python/Tools/Directories.py +++ b/lib/python/Tools/Directories.py @@ -33,6 +33,7 @@ SCOPE_DEFAULTDIR = 13 SCOPE_DEFAULTPARTITION = 14 SCOPE_DEFAULTPARTITIONMOUNTDIR = 15 SCOPE_METADIR = 16 +SCOPE_CURRENT_PLUGIN = 17 PATH_CREATE = 0 PATH_DONTCREATE = 1 @@ -85,7 +86,27 @@ def resolveFilename(scope, base = "", path_prefix = None): tmp = defaultPaths[SCOPE_SKIN] pos = config.skin.primary_skin.value.rfind('/') if pos != -1: - path = tmp[0]+config.skin.primary_skin.value[:pos+1] + #if basefile is not available use default skin path as fallback + tmpfile = tmp[0]+config.skin.primary_skin.value[:pos+1] + base + if fileExists(tmpfile): + path = tmp[0]+config.skin.primary_skin.value[:pos+1] + else: + path = tmp[0] + else: + path = tmp[0] + + elif scope == SCOPE_CURRENT_PLUGIN: + tmp = defaultPaths[SCOPE_PLUGINS] + from Components.config import config + skintmp = defaultPaths[SCOPE_SKIN] + pos = config.skin.primary_skin.value.rfind('/') + if pos != -1: + #if basefile is not available inside current skin path, use the original provided file as fallback + skintmpfile = skintmp[0]+config.skin.primary_skin.value[:pos+1] + base + if fileExists(skintmpfile): + path = skintmp[0]+config.skin.primary_skin.value[:pos+1] + else: + path = tmp[0] else: path = tmp[0] else: diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 1a28fbd..f85ce9c 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -917,7 +917,7 @@ eDVBServicePlay::eDVBServicePlay(const eServiceReference &ref, eDVBService *serv m_is_pvr = !m_reference.path.empty(); m_timeshift_enabled = m_timeshift_active = 0, m_timeshift_changed = 0; - m_skipmode = 0; + m_skipmode = m_fastforward = m_slowmotion = 0; CONNECT(m_service_handler.serviceEvent, eDVBServicePlay::serviceEvent); CONNECT(m_service_handler_timeshift.serviceEvent, eDVBServicePlay::serviceEventTimeshift); @@ -1185,7 +1185,10 @@ RESULT eDVBServicePlay::setSlowMotion(int ratio) eDebug("eDVBServicePlay::setSlowMotion(%d)", ratio); setFastForward_internal(0); if (m_decoder) + { + m_slowmotion = ratio; return m_decoder->setSlowMotion(ratio); + } else return -1; } @@ -1197,10 +1200,11 @@ RESULT eDVBServicePlay::setFastForward(int ratio) return setFastForward_internal(ratio); } -RESULT eDVBServicePlay::setFastForward_internal(int ratio) +RESULT eDVBServicePlay::setFastForward_internal(int ratio, bool final_seek) { - int skipmode, ffratio; - + int skipmode, ffratio, ret = 0; + pts_t pos=0; + if (ratio > 8) { skipmode = ratio; @@ -1225,19 +1229,28 @@ RESULT eDVBServicePlay::setFastForward_internal(int ratio) if (m_cue) m_cue->setSkipmode(skipmode * 90000); /* convert to 90000 per second */ } - + m_skipmode = skipmode; - + + if (final_seek) + eDebug("trickplay stopped .. ret %d, pos %lld", getPlayPosition(pos), pos); + + m_fastforward = ffratio; + if (!m_decoder) return -1; - + if (ffratio == 0) ; /* return m_decoder->play(); is done in caller*/ else if (ffratio != 1) - return m_decoder->setFastForward(ffratio); + ret = m_decoder->setFastForward(ffratio); else - return m_decoder->setTrickmode(); - return 0; + ret = m_decoder->setTrickmode(); + + if (pos) + eDebug("final seek after trickplay ret %d", seekTo(pos)); + + return ret; } RESULT eDVBServicePlay::seek(ePtr &ptr) @@ -1266,9 +1279,10 @@ RESULT eDVBServicePlay::getLength(pts_t &len) RESULT eDVBServicePlay::pause() { eDebug("eDVBServicePlay::pause"); - setFastForward_internal(0); + setFastForward_internal(0, m_slowmotion || m_fastforward > 1); if (m_decoder) { + m_slowmotion = 0; m_is_paused = 1; return m_decoder->pause(); } else @@ -1278,9 +1292,10 @@ RESULT eDVBServicePlay::pause() RESULT eDVBServicePlay::unpause() { eDebug("eDVBServicePlay::unpause"); - setFastForward_internal(0); + setFastForward_internal(0, m_slowmotion || m_fastforward > 1); if (m_decoder) { + m_slowmotion = 0; m_is_paused = 0; return m_decoder->play(); } else @@ -1728,6 +1743,7 @@ int eDVBServicePlay::selectAudioStream(int i) { eDVBServicePMTHandler::program program; eDVBServicePMTHandler &h = m_timeshift_active ? m_service_handler_timeshift : m_service_handler; + pts_t position = -1; if (h.getProgramInfo(program)) return -1; @@ -1750,6 +1766,9 @@ int eDVBServicePlay::selectAudioStream(int i) apidtype = program.audioStreams[stream].type; } + if (i != -1 && apid != m_current_audio_pid && (m_is_pvr || m_timeshift_active)) + eDebug("getPlayPosition ret %d, pos %lld in selectAudioStream", getPlayPosition(position), position); + m_current_audio_pid = apid; if (m_is_primary && m_decoder->setAudioPID(apid, apidtype)) @@ -1758,6 +1777,9 @@ int eDVBServicePlay::selectAudioStream(int i) return -4; } + if (position != -1) + eDebug("seekTo ret %d", seekTo(position)); + int rdsPid = apid; /* if we are not in PVR mode, timeshift is not active and we are not in pip mode, check if we need to enable the rds reader */ @@ -2229,7 +2251,7 @@ void eDVBServicePlay::switchToLive() m_new_subtitle_page_connection = 0; m_rds_decoder_event_connection = 0; m_video_event_connection = 0; - m_is_paused = m_skipmode = 0; /* not supported in live mode */ + m_is_paused = m_skipmode = m_fastforward = m_slowmotion = 0; /* not supported in live mode */ /* free the timeshift service handler, we need the resources */ m_service_handler_timeshift.free(); @@ -2398,17 +2420,8 @@ void eDVBServicePlay::updateDecoder() } } - std::string config_delay; - int config_delay_int = 0; - if(ePythonConfigQuery::getConfigValue("config.av.generalAC3delay", config_delay) == 0) - config_delay_int = atoi(config_delay.c_str()); - m_decoder->setAC3Delay(ac3_delay == -1 ? config_delay_int : ac3_delay + config_delay_int); - - if(ePythonConfigQuery::getConfigValue("config.av.generalPCMdelay", config_delay) == 0) - config_delay_int = atoi(config_delay.c_str()); - else - config_delay_int = 0; - m_decoder->setPCMDelay(pcm_delay == -1 ? config_delay_int : pcm_delay + config_delay_int); + setAC3Delay(ac3_delay == -1 ? 0 : ac3_delay); + setPCMDelay(pcm_delay == -1 ? 0 : pcm_delay); m_decoder->setVideoPID(vpid, vpidtype); selectAudioStream(); @@ -2932,16 +2945,28 @@ void eDVBServicePlay::setAC3Delay(int delay) { if (m_dvb_service) m_dvb_service->setCacheEntry(eDVBService::cAC3DELAY, delay ? delay : -1); - if (m_decoder) - m_decoder->setAC3Delay(delay); + if (m_decoder) { + std::string config_delay; + int config_delay_int = 0; + if(ePythonConfigQuery::getConfigValue("config.av.generalAC3delay", config_delay) == 0) + config_delay_int = atoi(config_delay.c_str()); + m_decoder->setAC3Delay(delay + config_delay_int); + } } void eDVBServicePlay::setPCMDelay(int delay) { if (m_dvb_service) m_dvb_service->setCacheEntry(eDVBService::cPCMDELAY, delay ? delay : -1); - if (m_decoder) - m_decoder->setPCMDelay(delay); + if (m_decoder) { + std::string config_delay; + int config_delay_int = 0; + if(ePythonConfigQuery::getConfigValue("config.av.generalPCMdelay", config_delay) == 0) + config_delay_int = atoi(config_delay.c_str()); + else + config_delay_int = 0; + m_decoder->setPCMDelay(delay + config_delay_int); + } } void eDVBServicePlay::video_event(struct iTSMPEGDecoder::videoEvent event) diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index b4d0f19..e3c7fd5 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -220,7 +220,7 @@ private: int m_current_audio_stream; int selectAudioStream(int n = -1); - RESULT setFastForward_internal(int ratio); + RESULT setFastForward_internal(int ratio, bool final_seek=false); /* timeshift */ ePtr m_record; @@ -233,6 +233,8 @@ private: void updateDecoder(); int m_skipmode; + int m_fastforward; + int m_slowmotion; /* cuesheet */ diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 34d0936..0f604b8 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -2,20 +2,23 @@ /* note: this requires gstreamer 0.10.x and a big list of plugins. */ /* it's currently hardcoded to use a big-endian alsasink as sink. */ +#include #include +#include +#include +#include #include -#include -#include +#include +#include +#include #include #include -#include -#include -#include + +#include + #include #include #include -/* for subtitles */ -#include // eServiceFactoryMP3 @@ -43,6 +46,7 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("mp4"); extensions.push_back("mov"); extensions.push_back("m4a"); + extensions.push_back("m2ts"); sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions); } @@ -187,6 +191,8 @@ int eStaticServiceMP3Info::getLength(const eServiceReference &ref) } // eServiceMP3 +int eServiceMP3::ac3_delay, + eServiceMP3::pcm_delay; eServiceMP3::eServiceMP3(eServiceReference ref) :m_ref(ref), m_pump(eApp, 1) @@ -659,7 +665,6 @@ RESULT eServiceMP3::getName(std::string &name) return 0; } - int eServiceMP3::getInfo(int w) { const gchar *tag = 0; @@ -955,6 +960,12 @@ RESULT eServiceMP3::subtitle(ePtr &ptr) return 0; } +RESULT eServiceMP3::audioDelay(ePtr &ptr) +{ + ptr = this; + return 0; +} + int eServiceMP3::getNumberOfTracks() { return m_audioStreams.size(); @@ -1093,6 +1104,8 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) g_object_set (G_OBJECT (sink), "emit-signals", TRUE, NULL); gst_object_unref(sink); } + setAC3Delay(ac3_delay); + setPCMDelay(pcm_delay); } break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: { @@ -1579,6 +1592,96 @@ int eServiceMP3::setBufferSize(int size) return 0; } +int eServiceMP3::getAC3Delay() +{ + return ac3_delay; +} + +int eServiceMP3::getPCMDelay() +{ + return pcm_delay; +} + +void eServiceMP3::setAC3Delay(int delay) +{ + ac3_delay = delay; + if (!m_gst_playbin || m_state != stRunning) + return; + else + { + GstElement *sink; + int config_delay_int = delay; + g_object_get (G_OBJECT (m_gst_playbin), "video-sink", &sink, NULL); + + if (sink) + { + std::string config_delay; + if(ePythonConfigQuery::getConfigValue("config.av.generalAC3delay", config_delay) == 0) + config_delay_int += atoi(config_delay.c_str()); + gst_object_unref(sink); + } + else + { + eDebug("dont apply ac3 delay when no video is running!"); + config_delay_int = 0; + } + + g_object_get (G_OBJECT (m_gst_playbin), "audio-sink", &sink, NULL); + + if (sink) + { + gchar *name = gst_element_get_name(sink); + if (strstr(name, "dvbaudiosink")) + eTSMPEGDecoder::setHwAC3Delay(config_delay_int); + g_free(name); + gst_object_unref(sink); + } + } +} + +void eServiceMP3::setPCMDelay(int delay) +{ + pcm_delay = delay; + if (!m_gst_playbin || m_state != stRunning) + return; + else + { + GstElement *sink; + int config_delay_int = delay; + g_object_get (G_OBJECT (m_gst_playbin), "video-sink", &sink, NULL); + + if (sink) + { + std::string config_delay; + if(ePythonConfigQuery::getConfigValue("config.av.generalPCMdelay", config_delay) == 0) + config_delay_int += atoi(config_delay.c_str()); + gst_object_unref(sink); + } + else + { + eDebug("dont apply pcm delay when no video is running!"); + config_delay_int = 0; + } + + g_object_get (G_OBJECT (m_gst_playbin), "audio-sink", &sink, NULL); + + if (sink) + { + gchar *name = gst_element_get_name(sink); + if (strstr(name, "dvbaudiosink")) + eTSMPEGDecoder::setHwPCMDelay(config_delay_int); + else + { + // this is realy untested..and not used yet + gint64 offset = config_delay_int; + offset *= 1000000; // milli to nano + g_object_set (G_OBJECT (m_gst_playbin), "ts-offset", offset, NULL); + } + g_free(name); + gst_object_unref(sink); + } + } +} #else #warning gstreamer not available, not building media player diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h index 15ed0b0..985179f 100644 --- a/lib/service/servicemp3.h +++ b/lib/service/servicemp3.h @@ -49,8 +49,9 @@ typedef enum { atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFL typedef enum { stPlainText, stSSA, stSRT } subtype_t; typedef enum { ctNone, ctMPEGTS, ctMPEGPS, ctMKV, ctAVI, ctMP4, ctVCD, ctCDA } containertype_t; -class eServiceMP3: public iPlayableService, public iPauseableService, - public iServiceInformation, public iSeekableService, public iAudioTrackSelection, public iAudioChannelSelection, public iSubtitleOutput, public iStreamedService, public Object +class eServiceMP3: public iPlayableService, public iPauseableService, + public iServiceInformation, public iSeekableService, public iAudioTrackSelection, public iAudioChannelSelection, + public iSubtitleOutput, public iStreamedService, public iAudioDelay, public Object { DECLARE_REF(eServiceMP3); public: @@ -70,13 +71,14 @@ public: RESULT audioTracks(ePtr &ptr); RESULT audioChannel(ePtr &ptr); RESULT subtitle(ePtr &ptr); + RESULT audioDelay(ePtr &ptr); // not implemented (yet) RESULT frontendInfo(ePtr &ptr) { ptr = 0; return -1; } RESULT subServices(ePtr &ptr) { ptr = 0; return -1; } RESULT timeshift(ePtr &ptr) { ptr = 0; return -1; } RESULT cueSheet(ePtr &ptr) { ptr = 0; return -1; } - RESULT audioDelay(ePtr &ptr) { ptr = 0; return -1; } + RESULT rdsDecoder(ePtr &ptr) { ptr = 0; return -1; } RESULT keys(ePtr &ptr) { ptr = 0; return -1; } RESULT stream(ePtr &ptr) { ptr = 0; return -1; } @@ -122,6 +124,12 @@ public: PyObject *getBufferCharge(); int setBufferSize(int size); + // iAudioDelay + int getAC3Delay(); + int getPCMDelay(); + void setAC3Delay(int); + void setPCMDelay(int); + struct audioStream { GstPad* pad; @@ -166,6 +174,8 @@ public: } }; private: + static int pcm_delay; + static int ac3_delay; int m_currentAudioStream; int m_currentSubtitleStream; int selectAudioStream(int i); diff --git a/mytest.py b/mytest.py index e42c100..c748538 100755 --- a/mytest.py +++ b/mytest.py @@ -41,14 +41,14 @@ profile("LOAD:skin") from skin import readSkin profile("LOAD:Tools") -from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE +from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_SKIN from Components.config import config, configfile, ConfigText, ConfigYesNo, ConfigInteger, NoSave InitFallbackFiles() profile("ReloadProfiles") eDVBDB.getInstance().reloadBouquets() -config.misc.radiopic = ConfigText(default = resolveFilename(SCOPE_SKIN_IMAGE)+"radio.mvi") +config.misc.radiopic = ConfigText(default = resolveFilename(SCOPE_CURRENT_SKIN, "radio.mvi")) config.misc.isNextRecordTimerAfterEventActionAuto = ConfigYesNo(default=False) config.misc.useTransponderTime = ConfigYesNo(default=True) config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts... diff --git a/skin.py b/skin.py old mode 100644 new mode 100755 index 5b8ce65..064fd21 --- a/skin.py +++ b/skin.py @@ -148,6 +148,8 @@ def applySingleAttribute(guiObject, desktop, attrib, value, scale = ((1,1),(1,1) guiObject.setFont(parseFont(value, scale)) elif attrib == 'zPosition': guiObject.setZPosition(int(value)) + elif attrib == 'itemHeight': + guiObject.setItemHeight(int(value)) elif attrib in ("pixmap", "backgroundPixmap", "selectionPixmap"): ptr = loadPixmap(value, desktop) # this should already have been filename-resolved. if attrib == "pixmap":