aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/NFIFlash
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2010-09-01 15:53:27 +0200
committerghost <andreas.monzner@multimedia-labs.de>2010-10-06 23:08:45 +0200
commit142b6e6e5f4aeaee51ce46ce08b5472c1e2966c6 (patch)
tree6ebb0b00b7b67460788884ab0422c3014cee13fd /lib/python/Plugins/SystemPlugins/NFIFlash
parent8c8d6b8c810534b63d114c8d51cfefac95eaee49 (diff)
downloadenigma2-142b6e6e5f4aeaee51ce46ce08b5472c1e2966c6.tar.gz
enigma2-142b6e6e5f4aeaee51ce46ce08b5472c1e2966c6.zip
[NFIFlash] ask whether to run configuration backup after image download (add #480)
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/NFIFlash')
-rw-r--r--lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
index 2c8b45db..27038e67 100644
--- a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
+++ b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
@@ -35,8 +35,8 @@ class ImageDownloadJob(Job):
MountTask(self, device, mountpoint)
ImageDownloadTask(self, url, mountpoint+filename)
ImageDownloadTask(self, url[:-4]+".nfo", mountpoint+filename[:-4]+".nfo")
- if device:
- UmountTask(self, mountpoint)
+ #if device:
+ #UmountTask(self, mountpoint)
def retry(self):
self.tasks[0].args += self.tasks[0].retryargs
@@ -611,11 +611,30 @@ class NFIDownload(Screen):
print "[ImageDownloadCB]", ret
# print job_manager.active_jobs, job_manager.failed_jobs, job_manager.job_classes, job_manager.in_background, job_manager.active_job
if len(job_manager.failed_jobs) == 0:
- self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."), type = MessageBox.TYPE_INFO)
+ self.session.openWithCallback(self.askBackupCB, MessageBox, _("The wizard can backup your current settings. Do you want to do a backup now?"), MessageBox.TYPE_YESNO)
else:
self.umountCallback = self.keyRed
self.umount()
+ def askBackupCB(self, ret):
+ if ret:
+ from Plugins.SystemPlugins.SoftwareManager.BackupRestore import BackupScreen
+
+ class USBBackupScreen(BackupScreen):
+ def __init__(self, session, usbmountpoint):
+ BackupScreen.__init__(self, session, runBackup = True)
+ self.backuppath = usbmountpoint
+ self.fullbackupfilename = self.backuppath + "/" + self.backupfile
+
+ self.session.openWithCallback(self.showHint, USBBackupScreen, self.usbmountpoint)
+ else:
+ self.showHint()
+
+ def showHint(self, ret=None):
+ self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."), type = MessageBox.TYPE_INFO)
+ self.umountCallback = self.keyRed
+ self.umount()
+
def getFeed(self):
self.feedDownloader15 = feedDownloader(self.feed_base, self.box, OE_vers="1.5")
self.feedDownloader16 = feedDownloader(self.feed_base, self.box, OE_vers="1.6")