diff options
Diffstat (limited to 'lib/python/Plugins')
8 files changed, 85 insertions, 33 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py index 7f755db4..6dbcd499 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py @@ -2,6 +2,7 @@ from Tools.Directories import fileExists from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList import DVDTitle import xml.dom.minidom +from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS class ConfigColor(ConfigSequence): def __init__(self, default = [128,128,128]): @@ -125,6 +126,14 @@ class DVDProject: for key in self.filekeys: val = self.settings.dict()[key].getValue() if not fileExists(val): + if val[0] != "/": + if key.find("font") == 0: + val = resolveFilename(SCOPE_FONTS)+val + else: + val = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/"+val + if fileExists(val): + self.settings.dict()[key].setValue(val) + continue self.error += "\n%s '%s' not found" % (key, val) #except AttributeError: #print "loadProject AttributeError", self.error diff --git a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml index 451e8a8b..4645260d 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml @@ -3,11 +3,11 @@ <settings name="Dreambox DVD record" authormode="menu_linked" - menutemplate="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml" + menutemplate="Thumbs_menu_clouds.ddvdm.xml" titlesetmode="multi" - vmgm="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg" + vmgm="vmgmdream.mpg" output="dvd" - isopath="/media/hdd/movie/" + isopath="/hdd/movie/" dataformat="iso9660_4" /> <titles> </titles> diff --git a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml index 0de7f4b6..bf6356a9 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml @@ -3,17 +3,17 @@ <settings titleformat="$i. $t" subtitleformat="$D.$M.$Y, $T $C, $d" - menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg" - menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2" + menubg="dreamdvd_boat.jpg" + menuaudio="silence.mp2" dimensions="(720, 576)" rows="5" cols="1" color_button="[8, 0, 0]" color_highlight="[0, 192, 192]" color_headline="[0, 0, 128]" - fontface_headline="/usr/share/fonts/nmsbd.ttf" - fontface_title="/usr/share/fonts/nmsbd.ttf" - fontface_subtitle="/usr/share/fonts/nmsbd.ttf" + fontface_headline="nmsbd.ttf" + fontface_title="nmsbd.ttf" + fontface_subtitle="nmsbd.ttf" fontsize_headline="46" fontsize_title="24" fontsize_subtitle="14" diff --git a/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml index c00c3fee..074f2037 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml @@ -3,17 +3,17 @@ <settings titleformat="$t" subtitleformat="$d" - menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_clouds.jpg" - menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2" + menubg="dreamdvd_clouds.jpg" + menuaudio="silence.mp2" dimensions="(720, 576)" rows="2" cols="2" color_button="[8, 0, 0]" color_highlight="[128, 0, 0]" color_headline="[128, 0, 0]" - fontface_headline="/usr/share/fonts/nmsbd.ttf" - fontface_title="/usr/share/fonts/nmsbd.ttf" - fontface_subtitle="/usr/share/fonts/nmsbd.ttf" + fontface_headline="nmsbd.ttf" + fontface_title="nmsbd.ttf" + fontface_subtitle="nmsbd.ttf" fontsize_headline="46" fontsize_title="18" fontsize_subtitle="12" diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 64b4ae50..e1ab3ef4 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -39,8 +39,11 @@ class FileBrowser(Screen): currDir = "/media/dvd/" if not pathExists(currDir): currDir = "/" + if lastpath == "": # 'None' is magic to start at the list of mountpoints + currDir = None - self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso)", useServiceRef = True) + inhibitDirs = ["/bin", "/boot", "/dev", "/etc", "/home", "/lib", "/proc", "/sbin", "/share", "/sys", "/tmp", "/usr", "/var"] + self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso|img)", useServiceRef = True) self["filelist"] = self.filelist self["FilelistActions"] = ActionMap(["SetupActions"], @@ -79,6 +82,12 @@ class FileBrowser(Screen): lastpath = (pathname.rstrip("/").rsplit("/",1))[0] print "lastpath video_ts.ifo=", lastpath self.close(pathname) + if fileExists(pathname+"VIDEO_TS/VIDEO_TS.IFO"): + print "dvd structure found, trying to open..." + lastpath = (pathname.rstrip("/").rsplit("/",1))[0] + print "lastpath video_ts.ifo=", lastpath + pathname += "VIDEO_TS" + self.close(pathname) else: lastpath = filename[0:filename.rfind("/")] print "lastpath directory=", lastpath @@ -625,6 +634,14 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP newref = eServiceReference(4369, 0, val) print "play", newref.toString() if curref is None or curref != newref: + if newref.toString().endswith("/VIDEO_TS") or newref.toString().endswith("/"): + names = newref.toString().rsplit("/",3) + if names[2].startswith("Disk ") or names[2].startswith("DVD "): + name = str(names[1]) + " - " + str(names[2]) + else: + name = names[2] + print "setting name to: ", self.service + newref.setName(str(name)) self.session.nav.playService(newref) self.service = self.session.nav.getCurrentService() print "self.service", self.service diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index 2ba53927..5fbfb0aa 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -32,6 +32,7 @@ eServiceFactoryDVD::eServiceFactoryDVD() { std::list<std::string> extensions; extensions.push_back("iso"); + extensions.push_back("img"); sc->addServiceFactory(eServiceFactoryDVD::id, this, extensions); } } @@ -480,7 +481,10 @@ RESULT eServiceDVD::getName(std::string &name) if ( m_ddvd_titlestring[0] != '\0' ) name = m_ddvd_titlestring; else - name = m_ref.path; + if ( !m_ref.name.empty() ) + name = m_ref.name; + else + name = m_ref.path; return 0; } diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py index 296d3bca..85ecc92d 100644 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py @@ -16,7 +16,7 @@ from Components.MultiContent import MultiContentEntryText from Components.ScrollLabel import ScrollLabel from Components.Harddisk import harddiskmanager from Components.Task import Task, Job, job_manager, Condition -from Tools.Directories import fileExists, isMount +from Tools.Directories import fileExists, isMount, resolveFilename, SCOPE_HDD, SCOPE_MEDIA from Tools.HardwareInfo import HardwareInfo from Tools.Downloader import downloadWithProgress from enigma import eConsoleAppContainer, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, RT_WRAP, eTimer @@ -391,7 +391,7 @@ class NFIDownload(Screen): self.box = HardwareInfo().get_device_name() self.feed_base = "http://www.dreamboxupdate.com/opendreambox" #/1.5/%s/images/" % self.box - self.usbmountpoint = "/mnt/usb/" + self.usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/" self.menulist = [] @@ -570,7 +570,7 @@ class NFIDownload(Screen): def ackedDestination(self): print "[ackedDestination]", self.branch, self.target_dir - self.container.setCWD("/mnt") + self.container.setCWD(resolveFilename(SCOPE_MEDIA)+"usb/") if self.target_dir[:8] == "/autofs/": self.target_dir = "/dev/" + self.target_dir[8:-1] @@ -792,13 +792,14 @@ If you already have a prepared bootable USB stick, please insert it now. Otherwi self.umountCallback() def main(session, **kwargs): - session.open(NFIDownload,"/home/root") + session.open(NFIDownload,resolveFilename(SCOPE_HDD)) def filescan_open(list, session, **kwargs): dev = "/dev/" + (list[0].path).rsplit('/',1)[0][7:] - print "mounting device " + dev + " to /mnt/usb..." - system("mount "+dev+" /mnt/usb/ -o rw,sync") - session.open(NFIDownload,"/mnt/usb/") + print "mounting device " + dev + " to /media/usb..." + usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/" + system("mount %s %s -o rw,sync" % (dev, usbmountpoint)) + session.open(NFIDownload,usbmountpoint) def filescan(**kwargs): from Components.Scanner import Scanner, ScanPath diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index e1f3e1de..896d9f2c 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -261,9 +261,6 @@ class UpdatePluginMenu(Screen): for x in parts: if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/': parts.remove(x) - for x in parts: - if x[1].startswith('/autofs/'): - parts.remove(x) if len(parts): self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts) elif (currentEntry == "backupfiles"): @@ -278,14 +275,20 @@ class UpdatePluginMenu(Screen): def backupfiles_choosen(self, ret): self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) - + config.plugins.configurationbackup.backupdirs.save() + config.plugins.configurationbackup.save() + config.save() + def backuplocation_choosen(self, option): + oldpath = config.plugins.configurationbackup.backuplocation.getValue() if option is not None: config.plugins.configurationbackup.backuplocation.value = str(option[1]) config.plugins.configurationbackup.backuplocation.save() config.plugins.configurationbackup.save() config.save() - self.createBackupfolders() + newpath = config.plugins.configurationbackup.backuplocation.getValue() + if newpath != oldpath: + self.createBackupfolders() def runUpgrade(self, result): if result: @@ -1335,9 +1338,9 @@ class UpdatePlugin(Screen): self["slider"] = self.slider self.activityslider = Slider(0, 100) self["activityslider"] = self.activityslider - self.status = StaticText(_("Upgrading Dreambox... Please wait")) + self.status = StaticText(_("Please wait...")) self["status"] = self.status - self.package = StaticText() + self.package = StaticText(_("Verifying your internet connection...")) self["package"] = self.package self.oktext = _("Press OK on your remote control to continue.") @@ -1348,20 +1351,35 @@ class UpdatePlugin(Screen): self.activity = 0 self.activityTimer = eTimer() self.activityTimer.callback.append(self.doActivityTimer) - self.activityTimer.start(100, False) self.ipkg = IpkgComponent() self.ipkg.addCallback(self.ipkgCallback) - self.updating = True - self.package.setText(_("Package list update")) - self.ipkg.startCmd(IpkgComponent.CMD_UPDATE) + self.updating = False self["actions"] = ActionMap(["WizardActions"], { "ok": self.exit, "back": self.exit }, -1) + + iNetwork.checkNetworkState(self.checkNetworkCB) + self.onClose.append(self.cleanup) + + def cleanup(self): + iNetwork.stopPingConsole() + + def checkNetworkCB(self,data): + if data is not None: + if data <= 2: + self.updating = True + self.activityTimer.start(100, False) + self.package.setText(_("Package list update")) + self.status.setText(_("Upgrading Dreambox... Please wait")) + self.ipkg.startCmd(IpkgComponent.CMD_UPDATE) + else: + self.package.setText(_("Your network is not working. Please try again.")) + self.status.setText(self.oktext) def doActivityTimer(self): self.activity += 1 @@ -1440,6 +1458,9 @@ class UpdatePlugin(Screen): self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?")) else: self.close() + else: + if not self.updating: + self.close() def exitAnswer(self, result): if result is not None and result: |
