modify FactoryTest plugin.
[vuplus_dvbapp] / RecordTimer.py
old mode 100644 (file)
new mode 100755 (executable)
index 4907f64..dc2f6b2
@@ -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)
 
@@ -282,13 +285,13 @@ class RecordTimerEntry(timer.TimerEntry, object):
                                self.record_service = None
                        if self.afterEvent == AFTEREVENT.STANDBY:
                                if not Screens.Standby.inStandby: # not already in standby
-                                       Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
                        elif self.afterEvent == AFTEREVENT.DEEPSTANDBY:
                                if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
                                        if Screens.Standby.inStandby: # in standby
                                                RecordTimerEntry.TryQuitMainloop() # start shutdown handling without screen
                                        else:
-                                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+                                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
                        return True
 
        def setAutoincreaseEnd(self, entry = None):