X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/416240a4aeda1eb0f3e44abb2e1bb672665b363e..e8164a09377e89aeb0c208c12b979811d5bc33fe:/RecordTimer.py diff --git a/RecordTimer.py b/RecordTimer.py old mode 100644 new mode 100755 index f670417a..4ece9c58 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -102,7 +102,10 @@ class RecordTimerEntry(timer.TimerEntry, object): assert isinstance(serviceref, ServiceReference) - self.service_ref = serviceref + if serviceref.isRecordable(): + self.service_ref = serviceref + else: + self.service_ref = ServiceReference(None) self.eit = eit self.dontSave = False self.name = name @@ -129,6 +132,7 @@ class RecordTimerEntry(timer.TimerEntry, object): def calculateFilename(self): service_name = self.service_ref.getServiceName() begin_date = strftime("%Y%m%d %H%M", localtime(self.begin)) + begin_shortdate = strftime("%Y%m%d", localtime(self.begin)) print "begin_date: ", begin_date print "service_name: ", service_name @@ -137,7 +141,15 @@ class RecordTimerEntry(timer.TimerEntry, object): filename = begin_date + " - " + service_name if self.name: - filename += " - " + self.name + if config.usage.setup_level.index >= 2: # expert+ + if config.recording.filename_composition.value == "short": + filename = begin_shortdate + " - " + self.name + elif config.recording.filename_composition.value == "long": + filename += " - " + self.name + " - " + self.description + else: + filename += " - " + self.name # standard + else: + filename += " - " + self.name if config.recording.ascii_filenames.value: filename = ASCIItranslit.legacyEncode(filename)