when in standby, don't ask for preview, just burn baby, burn
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / Process.py
index 6d9a44918c1ecb9d95dbe4a255488df60fdd757d..74ffbde73e528655e94c88e84d43371acee82d2e 100644 (file)
@@ -166,7 +166,10 @@ class DemuxTask(Task):
                if failed:
                        import os
                        for file in self.generated_files:
-                               os.remove(file)
+                               try:
+                                       os.remove(file)
+                               except OSError:
+                                       pass
 
 class MplexTaskPostcondition(Condition):
        def check(self, task):
@@ -392,8 +395,12 @@ class PreviewTask(Task):
                if self.job.menupreview:
                        self.previewProject()
                else:
-                       from Tools import Notifications
-                       Notifications.AddNotificationWithCallback(self.previewCB, MessageBox, _("Do you want to preview this DVD before burning?"), timeout = 60, default = False)
+                       import Screens.Standby
+                       if Screens.Standby.inStandby:
+                               self.previewCB(False)
+                       else:
+                               from Tools import Notifications
+                               Notifications.AddNotificationWithCallback(self.previewCB, MessageBox, _("Do you want to preview this DVD before burning?"), timeout = 60, default = False)
 
        def abort(self):
                self.finish(aborted = True)