msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-19 13:30+0100\n"
+"POT-Creation-Date: 2009-08-10 22:01+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Add"
msgstr ""
-#: ../src/plugin.py:147 ../src/plugin.py:148
+#: ../src/plugin.py:164 ../src/plugin.py:165
msgid "Add AutoTimer..."
msgstr ""
-#: ../src/AutoTimerEditor.py:411
+#: ../src/AutoTimerEditor.py:420
msgid "Add Filters"
msgstr ""
-#: ../src/AutoTimerEditor.py:417
+#: ../src/AutoTimerEditor.py:426
msgid "Add Services"
msgstr ""
msgid "Add new AutoTimer"
msgstr ""
-#: ../src/AutoTimerSettings.py:41
+#: ../src/AutoTimerSettings.py:36
msgid "Add timer as disabled on conflict"
msgstr ""
-#: ../src/AutoTimerEditor.py:475 ../src/AutoTimerImporter.py:165
+#: ../src/AutoTimerEditor.py:485 ../src/AutoTimerImporter.py:175
msgid "After event"
msgstr ""
-#: ../src/plugin.py:18
+#: ../src/plugin.py:22
msgid "All non-repeating Timers"
msgstr ""
-#: ../src/AutoTimerEditor.py:493
+#: ../src/AutoTimerEditor.py:503
msgid "Ammount of recordings left"
msgstr ""
-#: ../src/AutoTimerEditor.py:362
+#: ../src/AutoTimerEditor.py:371
msgid "AutoTimer Editor"
msgstr ""
-#: ../src/AutoTimerEditor.py:716
+#: ../src/AutoTimerEditor.py:731
msgid "AutoTimer Filters"
msgstr ""
msgid "AutoTimer Overview"
msgstr ""
-#: ../src/AutoTimerEditor.py:915
+#: ../src/AutoTimerEditor.py:935
msgid "AutoTimer Services"
msgstr ""
-#: ../src/AutoTimerSettings.py:33
+#: ../src/AutoTimerSettings.py:25 ../src/AutoTimerSettings.py:48
msgid "AutoTimer Settings"
msgstr ""
-#: ../src/AutoTimerEditor.py:456 ../src/AutoTimerWizard.py:91
+#: ../src/AutoTimerEditor.py:466 ../src/AutoTimerWizard.py:78
msgid "Begin of Timespan"
msgstr ""
-#: ../src/AutoTimerEditor.py:484
+#: ../src/AutoTimerEditor.py:494
msgid "Begin of after Event Timespan"
msgstr ""
-#: ../src/AutoTimerEditor.py:924
+#: ../src/AutoTimerEditor.py:946
msgid "Bouquets"
msgstr ""
-#: ../src/AutoTimerEditor.py:379 ../src/AutoTimerEditor.py:732
-#: ../src/AutoTimerEditor.py:932 ../src/AutoTimerImporter.py:41
-#: ../src/AutoTimerImporter.py:117 ../src/AutoTimerPreview.py:35
-#: ../src/AutoTimerSettings.py:48
+#: ../src/AutoTimerEditor.py:388 ../src/AutoTimerEditor.py:752
+#: ../src/AutoTimerEditor.py:955 ../src/AutoTimerImporter.py:43
+#: ../src/AutoTimerImporter.py:120 ../src/AutoTimerPreview.py:57
+#: ../src/AutoTimerSettings.py:45
msgid "Cancel"
msgstr ""
msgid "Channel Selection"
msgstr ""
-#: ../src/AutoTimerEditor.py:924
+#: ../src/AutoTimerEditor.py:945
msgid "Channels"
msgstr ""
-#: ../src/AutoTimerEditor.py:322
+#: ../src/AutoTimerEditor.py:331
msgid "Choose target folder"
msgstr ""
-#: ../src/plugin.py:23
+#: ../src/plugin.py:27
msgid "Classic"
msgstr ""
msgid "Close and save changes"
msgstr ""
-#: ../src/AutoTimerSettings.py:65
+#: ../src/AutoTimerSettings.py:64
msgid "Configure AutoTimer behavior"
msgstr ""
msgid "Create a new timer using the wizard"
msgstr ""
-#: ../src/AutoTimerEditor.py:278
+#: ../src/AutoTimerEditor.py:287
#, python-format
msgid "Custom (%s)"
msgstr ""
-#: ../src/AutoTimerEditor.py:501
+#: ../src/AutoTimerEditor.py:511
msgid "Custom Location"
msgstr ""
-#: ../src/AutoTimerEditor.py:460
+#: ../src/AutoTimerEditor.py:470
msgid "Custom offset"
msgstr ""
msgid "Delete"
msgstr ""
-#: ../src/AutoTimerEditor.py:441 ../src/AutoTimerWizard.py:99
+#: ../src/AutoTimerEditor.py:450 ../src/AutoTimerWizard.py:86
msgid "Description"
msgstr ""
msgid "Do you really want to delete %s?"
msgstr ""
-#: ../src/AutoTimerEditor.py:446
+#: ../src/AutoTimerEditor.py:455
msgid "EPG Encoding"
msgstr ""
-#: ../src/AutoTimerEditor.py:405
+#: ../src/AutoTimerEditor.py:414
msgid "Edit AutoTimer"
msgstr ""
-#: ../src/AutoTimerEditor.py:753
+#: ../src/AutoTimerEditor.py:773
msgid "Edit AutoTimer Filters"
msgstr ""
-#: ../src/AutoTimerEditor.py:953
+#: ../src/AutoTimerEditor.py:976
msgid "Edit AutoTimer Services"
msgstr ""
-#: ../src/AutoTimerEditor.py:409
+#: ../src/AutoTimerEditor.py:418
msgid "Edit Filters"
msgstr ""
-#: ../src/AutoTimerEditor.py:415
+#: ../src/AutoTimerEditor.py:424
msgid "Edit Services"
msgstr ""
-#: ../src/plugin.py:145 ../src/plugin.py:146
+#: ../src/plugin.py:158 ../src/plugin.py:163
msgid "Edit Timers and scan for new Events"
msgstr ""
msgid "Edit selected AutoTimer"
msgstr ""
-#: ../src/AutoTimerEditor.py:975
+#: ../src/AutoTimerEditor.py:998
msgid "Editing"
msgstr ""
-#: ../src/AutoTimerSettings.py:42
+#: ../src/AutoTimerSettings.py:37
msgid "Editor for new AutoTimers"
msgstr ""
-#: ../src/AutoTimerEditor.py:797
+#: ../src/AutoTimerEditor.py:817
msgid "Enable Filtering"
msgstr ""
-#: ../src/AutoTimerEditor.py:974
+#: ../src/AutoTimerEditor.py:997
msgid "Enable Service Restriction"
msgstr ""
-#: ../src/AutoTimerEditor.py:440 ../src/AutoTimerImporter.py:127
-#: ../src/AutoTimerWizard.py:98
+#: ../src/AutoTimerEditor.py:449 ../src/AutoTimerImporter.py:130
+#: ../src/AutoTimerWizard.py:85
msgid "Enabled"
msgstr ""
-#: ../src/AutoTimerEditor.py:457 ../src/AutoTimerWizard.py:92
+#: ../src/AutoTimerEditor.py:467 ../src/AutoTimerWizard.py:79
msgid "End of Timespan"
msgstr ""
-#: ../src/AutoTimerEditor.py:485
+#: ../src/AutoTimerEditor.py:495
msgid "End of after Event Timespan"
msgstr ""
-#: ../src/AutoTimerEditor.py:806 ../src/AutoTimerEditor.py:823
-#: ../src/AutoTimerEditor.py:848
+#: ../src/AutoTimerImporter.py:145
+msgid "Exact match"
+msgstr ""
+
+#: ../src/AutoTimerEditor.py:826 ../src/AutoTimerEditor.py:843
+#: ../src/AutoTimerEditor.py:868
msgid "Exclude"
msgstr ""
-#: ../src/AutoTimerEditor.py:479
+#: ../src/AutoTimerEditor.py:489
msgid "Execute after Event during Timespan"
msgstr ""
-#: ../src/AutoTimerEditor.py:798
+#: ../src/AutoTimerEditor.py:818
msgid "Filter"
msgstr ""
-#: ../src/plugin.py:110
+#: ../src/plugin.py:116
#, python-format
msgid ""
"Found a total of %d matching Events.\n"
msgid "Friday"
msgstr ""
-#: ../src/AutoTimerSettings.py:40
+#: ../src/AutoTimerSettings.py:35
msgid "Guess existing Timer based on Begin/End"
msgstr ""
-#: ../src/AutoTimerImporter.py:212
+#: ../src/AutoTimerImporter.py:222
msgid "Import AutoTimer"
msgstr ""
msgid "Import from EPG"
msgstr ""
-#: ../src/AutoTimerEditor.py:811 ../src/AutoTimerEditor.py:828
-#: ../src/AutoTimerEditor.py:849
+#: ../src/AutoTimerEditor.py:831 ../src/AutoTimerEditor.py:848
+#: ../src/AutoTimerEditor.py:869
msgid "Include"
msgstr ""
-#: ../src/AutoTimerImporter.py:183
+#: ../src/AutoTimerImporter.py:193
msgid "Location"
msgstr ""
-#: ../src/AutoTimerImporter.py:147
+#: ../src/AutoTimerImporter.py:157
#, python-format
msgid "Match Timespan: %02d:%02d - %02d:%02d"
msgstr ""
-#: ../src/AutoTimerEditor.py:442 ../src/AutoTimerWizard.py:100
+#: ../src/AutoTimerEditor.py:451 ../src/AutoTimerWizard.py:87
msgid "Match Title"
msgstr ""
-#: ../src/AutoTimerImporter.py:136
+#: ../src/AutoTimerImporter.py:139
#, python-format
msgid "Match title: %s"
msgstr ""
-#: ../src/AutoTimerEditor.py:473
+#: ../src/AutoTimerEditor.py:483
msgid "Maximum Duration (in m)"
msgstr ""
-#: ../src/AutoTimerSettings.py:39
+#: ../src/AutoTimerSettings.py:34
msgid "Modify existing Timers"
msgstr ""
msgid "Monday"
msgstr ""
-#: ../src/AutoTimerEditor.py:276
+#: ../src/AutoTimerEditor.py:285
msgid "Monthly"
msgstr ""
-#: ../src/AutoTimerEditor.py:276
+#: ../src/AutoTimerEditor.py:285
msgid "Never"
msgstr ""
-#: ../src/AutoTimerEditor.py:735 ../src/AutoTimerEditor.py:935
+#: ../src/AutoTimerEditor.py:755 ../src/AutoTimerEditor.py:958
msgid "New"
msgstr ""
-#: ../src/AutoTimerEditor.py:283 ../src/
+#: ../src/AutoTimerEditor.py:292 ../src/
msgid "No"
msgstr ""
-#: ../src/AutoTimerEditor.py:307 ../src/AutoTimerEditor.py:330
-#: ../src/plugin.py:16
+#: ../src/AutoTimerEditor.py:316 ../src/AutoTimerEditor.py:339
+#: ../src/plugin.py:20
msgid "None"
msgstr ""
-#: ../src/AutoTimerEditor.py:380 ../src/AutoTimerEditor.py:933
-#: ../src/AutoTimerImporter.py:42 ../src/AutoTimerImporter.py:118
-#: ../src/AutoTimerSettings.py:49
+#: ../src/AutoTimerEditor.py:389 ../src/AutoTimerEditor.py:956
+#: ../src/AutoTimerImporter.py:44 ../src/AutoTimerImporter.py:121
+#: ../src/AutoTimerSettings.py:44
msgid "OK"
msgstr ""
-#: ../src/AutoTimerEditor.py:466
+#: ../src/AutoTimerEditor.py:476
msgid "Offset after recording (in m)"
msgstr ""
-#: ../src/AutoTimerEditor.py:465
+#: ../src/AutoTimerEditor.py:475
msgid "Offset before recording (in m)"
msgstr ""
-#: ../src/AutoTimerEditor.py:285
+#: ../src/AutoTimerEditor.py:294
msgid "On any service"
msgstr ""
-#: ../src/AutoTimerEditor.py:284
+#: ../src/AutoTimerEditor.py:293
msgid "On same service"
msgstr ""
-#: ../src/plugin.py:17
+#: ../src/plugin.py:21
msgid "Only AutoTimers created during this Session"
msgstr ""
-#: ../src/AutoTimerEditor.py:450 ../src/AutoTimerWizard.py:85
+#: ../src/AutoTimerEditor.py:460 ../src/AutoTimerWizard.py:72
msgid "Only match during Timespan"
msgstr ""
-#: ../src/AutoTimerImporter.py:156
+#: ../src/AutoTimerImporter.py:166
#, python-format
msgid "Only on Service: %s"
msgstr ""
msgid "Open Context Menu"
msgstr ""
-#: ../src/AutoTimerImporter.py:283
+#: ../src/AutoTimerEditor.py:459
+msgid "Override found with alternative Service"
+msgstr ""
+
+#: ../src/AutoTimerImporter.py:299
msgid "Please provide a Text to match"
msgstr ""
-#: ../src/AutoTimerSettings.py:38
+#: ../src/AutoTimerSettings.py:32
msgid "Poll Interval (in h)"
msgstr ""
-#: ../src/AutoTimerSettings.py:37
+#: ../src/AutoTimerSettings.py:31
msgid "Poll automatically"
msgstr ""
msgid "Preview"
msgstr ""
-#: ../src/AutoTimerPreview.py:52
+#: ../src/AutoTimerPreview.py:74
msgid "Preview AutoTimer"
msgstr ""
-#: ../src/AutoTimerEditor.py:556 ../src/AutoTimerEditor.py:878
-#: ../src/AutoTimerEditor.py:1043 ../src/AutoTimerImporter.py:218
+#: ../src/AutoTimerEditor.py:568 ../src/AutoTimerEditor.py:898
+#: ../src/AutoTimerEditor.py:1066 ../src/AutoTimerImporter.py:228
#: ../src/AutoTimerOverview.py:155
msgid "Really close without saving settings?"
msgstr ""
-#: ../src/AutoTimerEditor.py:488
+#: ../src/AutoTimerEditor.py:498
msgid "Record a maximum of x times"
msgstr ""
-#: ../src/AutoTimerEditor.py:984 ../src/AutoTimerEditor.py:1035
+#: ../src/AutoTimerEditor.py:1007 ../src/AutoTimerEditor.py:1058
msgid "Record on"
msgstr ""
msgid "Remove selected AutoTimer"
msgstr ""
-#: ../src/AutoTimerEditor.py:496
+#: ../src/AutoTimerEditor.py:506
msgid "Require Description to be unique"
msgstr ""
-#: ../src/AutoTimerEditor.py:494
+#: ../src/AutoTimerEditor.py:504
msgid "Reset Count"
msgstr ""
msgid "Saturday"
msgstr ""
-#: ../src/AutoTimerEditor.py:733 ../src/AutoTimerOverview.py:48
+#: ../src/AutoTimerEditor.py:753 ../src/AutoTimerOverview.py:48
msgid "Save"
msgstr ""
-#: ../src/AutoTimerEditor.py:447
+#: ../src/AutoTimerEditor.py:456
msgid "Search Type"
msgstr ""
-#: ../src/AutoTimerEditor.py:448
+#: ../src/AutoTimerEditor.py:457
msgid "Search strictness"
msgstr ""
-#: ../src/AutoTimerImporter.py:56
+#: ../src/AutoTimerImporter.py:58
msgid "Select a Timer to Import"
msgstr ""
-#: ../src/AutoTimerEditor.py:1021
+#: ../src/AutoTimerEditor.py:1044
msgid "Select bouquet to record on"
msgstr ""
-#: ../src/AutoTimerEditor.py:1015
+#: ../src/AutoTimerEditor.py:1038
msgid "Select channel to record on"
msgstr ""
-#: ../src/AutoTimerEditor.py:846
+#: ../src/AutoTimerEditor.py:866
msgid "Select type of Filter"
msgstr ""
-#: ../src/AutoTimerEditor.py:469
+#: ../src/AutoTimerEditor.py:479
msgid "Set maximum Duration"
msgstr ""
msgid "Setup"
msgstr ""
-#: ../src/AutoTimerPreview.py:58
+#: ../src/AutoTimerSettings.py:33
+msgid "Show in Extensionmenu"
+msgstr ""
+
+#: ../src/AutoTimerPreview.py:80
msgid "Sort AutoTimer"
msgstr ""
-#: ../src/AutoTimerPreview.py:56
+#: ../src/AutoTimerPreview.py:78
msgid "Sort Time"
msgstr ""
msgid "Sunday"
msgstr ""
-#: ../src/AutoTimerEditor.py:503 ../src/AutoTimerImporter.py:192
+#: ../src/AutoTimerEditor.py:513 ../src/AutoTimerImporter.py:202
msgid "Tags"
msgstr ""
-#: ../src/AutoTimerEditor.py:573
+#: ../src/AutoTimerEditor.py:585
msgid "The match attribute is mandatory."
msgstr ""
msgid "Thursday"
msgstr ""
-#: ../src/AutoTimerEditor.py:449 ../src/AutoTimerImporter.py:174
-#: ../src/AutoTimerWizard.py:101
+#: ../src/AutoTimerEditor.py:458 ../src/AutoTimerImporter.py:184
+#: ../src/AutoTimerWizard.py:88
msgid "Timer Type"
msgstr ""
msgid "Tuesday"
msgstr ""
-#: ../src/AutoTimerEditor.py:499
+#: ../src/AutoTimerEditor.py:509
msgid "Use a custom location"
msgstr ""
msgid "Weekend"
msgstr ""
-#: ../src/AutoTimerEditor.py:276
+#: ../src/AutoTimerEditor.py:285
msgid "Weekly (Monday)"
msgstr ""
-#: ../src/AutoTimerEditor.py:276
+#: ../src/AutoTimerEditor.py:285
msgid "Weekly (Sunday)"
msgstr ""
-#: ../src/plugin.py:24
+#: ../src/plugin.py:28
msgid "Wizard"
msgstr ""
-#: ../src/AutoTimerEditor.py:582 ../src/AutoTimerImporter.py:233
+#: ../src/AutoTimerEditor.py:594 ../src/AutoTimerImporter.py:243
#, python-format
msgid ""
"You entered \"%s\" as Text to match.\n"
"Do you want to remove trailing whitespaces?"
msgstr ""
-#: ../src/plugin.py:81
+#: ../src/plugin.py:87
#, python-format
msgid ""
"Your config file is not well-formed:\n"
"%s"
msgstr ""
-#: ../src/AutoTimerEditor.py:232 ../src/AutoTimerImporter.py:26
+#: ../src/AutoTimerEditor.py:241 ../src/AutoTimerImporter.py:28
msgid "auto"
msgstr ""
-#: ../src/AutoTimerEditor.py:179
+#: ../src/AutoTimerEditor.py:181
msgid "case-insensitive search"
msgstr ""
-#: ../src/AutoTimerEditor.py:179
+#: ../src/AutoTimerEditor.py:181
msgid "case-sensitive search"
msgstr ""
-#: ../src/AutoTimerEditor.py:734 ../src/AutoTimerEditor.py:934
+#: ../src/AutoTimerEditor.py:754 ../src/AutoTimerEditor.py:957
msgid "delete"
msgstr ""
-#: ../src/AutoTimerImporter.py:127
+#: ../src/AutoTimerImporter.py:130
msgid "disable"
msgstr ""
-#: ../src/AutoTimerEditor.py:232 ../src/AutoTimerImporter.py:23
+#: ../src/AutoTimerEditor.py:238 ../src/AutoTimerImporter.py:25
msgid "do nothing"
msgstr ""
-#: ../src/AutoTimerImporter.py:127
+#: ../src/AutoTimerImporter.py:130
msgid "enable"
msgstr ""
-#: ../src/AutoTimerEditor.py:178
+#: ../src/AutoTimerEditor.py:180
msgid "exact match"
msgstr ""
-#: ../src/AutoTimerEditor.py:232 ../src/AutoTimerImporter.py:24
+#: ../src/AutoTimerEditor.py:240 ../src/AutoTimerImporter.py:26
msgid "go to deep standby"
msgstr ""
-#: ../src/AutoTimerEditor.py:232 ../src/AutoTimerImporter.py:25
+#: ../src/AutoTimerEditor.py:239 ../src/AutoTimerImporter.py:27
msgid "go to standby"
msgstr ""
-#: ../src/AutoTimerEditor.py:719
+#: ../src/AutoTimerEditor.py:737
msgid "in Description"
msgstr ""
-#: ../src/AutoTimerEditor.py:719
+#: ../src/AutoTimerEditor.py:736
msgid "in Shortdescription"
msgstr ""
-#: ../src/AutoTimerEditor.py:719
+#: ../src/AutoTimerEditor.py:735
msgid "in Title"
msgstr ""
-#: ../src/AutoTimerList.py:77
+#: ../src/AutoTimerPreview.py:50
msgid "mins"
msgstr ""
-#: ../src/AutoTimerEditor.py:719
+#: ../src/AutoTimerEditor.py:738
msgid "on Weekday"
msgstr ""
-#: ../src/AutoTimerEditor.py:178
+#: ../src/AutoTimerEditor.py:180
msgid "partial match"
msgstr ""
-#: ../src/AutoTimerEditor.py:182 ../src/AutoTimerImporter.py:174
+#: ../src/AutoTimerEditor.py:187 ../src/AutoTimerImporter.py:184
msgid "record"
msgstr ""
-#: ../src/AutoTimerEditor.py:232
+#: ../src/AutoTimerEditor.py:238
msgid "standard"
msgstr ""
-#: ../src/AutoTimerEditor.py:182 ../src/AutoTimerImporter.py:174
+#: ../src/AutoTimerEditor.py:187 ../src/AutoTimerImporter.py:184
msgid "zap"
msgstr ""
msgstr ""
"Project-Id-Version: Enigma2 AutoTimer Plugin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-19 13:30+0100\n"
-"PO-Revision-Date: 2009-01-19 13:32+0100\n"
+"POT-Creation-Date: 2009-08-10 22:01+0200\n"
+"PO-Revision-Date: 2009-08-10 22:03+0100\n"
"Last-Translator: Moritz Venn <moritz.venn@freaque.net>\n"
"Language-Team: german <de@li.org>\n"
"MIME-Version: 1.0\n"
msgid "End of after Event Timespan"
msgstr "Ende der Zeitspanne"
+msgid "Exact match"
+msgstr "Exakter Treffer"
+
msgid "Exclude"
msgstr "Ausschließen"
msgid "Open Context Menu"
msgstr "Öffne Kontext-Menü"
+msgid "Override found with alternative Service"
+msgstr "Service mit alternative ersetzen"
+
msgid "Please provide a Text to match"
msgstr "Bitte zu findenden Text eingeben"
msgid "Setup"
msgstr "Einstellungen"
+msgid "Show in Extensionmenu"
+msgstr "In Erweiterunsmenü anzeigen"
+
msgid "Sort AutoTimer"
msgstr "Sortiere AutoTimer"
begin -= config.recording.margin_before.value * 60
end += config.recording.margin_after.value * 60
+ # Eventually change service to alternative
+ if timer.overrideAlternatives:
+ serviceref = timer.getAlternative(serviceref)
+
total += 1
# Append to timerlist and abort if simulating
-# Format Counter
+# Format counter
from time import strftime
# regular expression
from re import compile as re_compile
+# Alternatives and service restriction
+from enigma import eServiceReference, eServiceCenter
+
class AutoTimerComponent(object):
"""AutoTimer Component which also handles validity checks"""
afterevent = [], exclude = None, maxduration = None, destination = None, \
include = None, matchCount = 0, matchLeft = 0, matchLimit = '', matchFormatString = '', \
lastBegin = 0, justplay = False, avoidDuplicateDescription = 0, bouquets = None, \
- tags = None, encoding = 'UTF-8', searchType = "partial", searchCase = "insensitive"):
+ tags = None, encoding = 'UTF-8', searchType = "partial", searchCase = "insensitive", \
+ overrideAlternatives = False):
self.name = name
self.match = match
self.enabled = enabled
self.encoding = encoding
self.searchType = searchType
self.searchCase = searchCase
+ self.overrideAlternatives = overrideAlternatives
### Attributes / Properties
getOffsetBegin = lambda self: self.offset[0]/60
getOffsetEnd = lambda self: self.offset[1]/60
+ getOverrideAlternatives = lambda self: self.overrideAlternatives and "1" or "0"
+
getServices = lambda self: self._services
getTags = lambda self: self.tags
return False
- def checkServices(self, service):
+ def checkServices(self, check_service):
services = self.services
bouquets = self.bouquets
if services or bouquets:
- if service in services:
- return False
+ addbouquets = []
+
+ for service in services:
+ if service == check_service:
+ return False
+
+ myref = eServiceReference(str(service))
+ if myref.flags & eServiceReference.isGroup:
+ addbouquets.append(service)
- from enigma import eServiceReference, eServiceCenter
serviceHandler = eServiceCenter.getInstance()
- for bouquet in bouquets:
+ for bouquet in bouquets + addbouquets:
myref = eServiceReference(str(bouquet))
mylist = serviceHandler.list(myref)
if mylist is not None:
if pos != -1:
value = value[:pos+1]
- if value == service:
+ if value == check_service:
return False
else:
break
return True
return False
+ """
+ Return alternative service including a given ref.
+ Note that this only works for alternatives that the autotimer is restricted to.
+ """
+ def getAlternative(self, override_service):
+ services = self.services
+ print "[AutoTimerComponent] looking for", override_service
+ if services:
+ serviceHandler = eServiceCenter.getInstance()
+
+ for service in services:
+ myref = eServiceReference(str(service))
+ print "[AutoTimerComponent] checking", service
+ if myref.flags & eServiceReference.isGroup:
+ print "[AutoTimerComponent] isGroup!"
+ mylist = serviceHandler.list(myref)
+ if mylist is not None:
+ while 1:
+ s = mylist.getNext()
+ if s.valid():
+ # strip all after last :
+ value = s.toString()
+ pos = value.rfind(':')
+ if pos != -1:
+ value = value[:pos+1]
+
+ if value == override_service:
+ print "[AutoTimerComponent] found match, returning", service
+ return service
+ else:
+ break
+ return override_service
+
def checkTimespan(self, begin):
return self.checkAnyTimespan(begin, *self.timespan)
tags = self.tags,
encoding = self.encoding,
searchType = self.searchType,
- searchCase = self.searchCase
+ searchCase = self.searchCase,
+ overrideAlternatives = self.overrideAlternatives
)
def __deepcopy__(self, memo):
tags = self.tags[:],
encoding = self.encoding,
searchType = self.searchType,
- searchCase = self.searchCase
+ searchCase = self.searchCase,
+ overrideAlternatives = self.overrideAlternatives
)
def __eq__(self, other):
str(self.justplay),
str(self.avoidDuplicateDescription),
str(self.bouquets),
- str(self.tags)
+ str(self.tags),
+ str(self.overrideAlternatives),
)),
")>"
))
from Tools.XMLTools import stringToXML
from ServiceReference import ServiceReference
+from enigma import eServiceReference
+
CURRENT_CONFIG_VERSION = "5"
def getValue(definitions, default):
baseTimer.searchType = element.get("searchType", baseTimer.searchType)
baseTimer.searchCase = element.get("searchCase", baseTimer.searchCase)
+ # Read out if we should change to alternative services
+ baseTimer.overrideAlternatives = int(element.get("overrideAlternatives", baseTimer.overrideAlternatives))
+
# Read out timespan
start = element.get("from")
end = element.get("to")
baseTimer.maxduration = int(maxduration)*60
# Read out recording path
- baseTimer.destination = element.get("location", "").encode("UTF-8") or None
+ default = baseTimer.destination or ""
+ baseTimer.destination = element.get("location", default).encode("UTF-8") or None
# Read out offset
offset = element.get("offset")
for service in l:
value = service.text
if value:
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- value = value[:pos+1]
+ myref = eServiceReference(str(value))
+ if not (myref.flags & eServiceReference.isGroup):
+ # strip all after last :
+ pos = value.rfind(':')
+ if pos != -1:
+ value = value[:pos+1]
servicelist.append(value)
baseTimer.services = servicelist
for service in elements:
value = service.text
if value:
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- value = value[:pos+1]
+ myref = eServiceReference(str(value))
+ if not (myref.flags & eServiceReference.isGroup):
+ # strip all after last :
+ pos = value.rfind(':')
+ if pos != -1:
+ value = value[:pos+1]
servicelist.append(value)
else:
# Timespan
if defaultTimer.hasTimespan():
- list.extend([' from="', defaultTimer.getTimespanBegin(), '" to="', defaultTimer.getTimespanEnd(), '"'])
+ list.extend((' from="', defaultTimer.getTimespanBegin(), '" to="', defaultTimer.getTimespanEnd(), '"'))
# Duration
if defaultTimer.hasDuration():
- list.extend([' maxduration="', str(defaultTimer.getDuration()), '"'])
+ list.extend((' maxduration="', str(defaultTimer.getDuration()), '"'))
# Destination
if defaultTimer.hasDestination():
- list.extend([' location="', stringToXML(defaultTimer.destination), '"'])
+ list.extend((' location="', stringToXML(defaultTimer.destination), '"'))
# Offset
if defaultTimer.hasOffset():
if defaultTimer.isOffsetEqual():
- list.extend([' offset="', str(defaultTimer.getOffsetBegin()), '"'])
+ list.extend((' offset="', str(defaultTimer.getOffsetBegin()), '"'))
else:
- list.extend([' offset="', str(defaultTimer.getOffsetBegin()), ',', str(defaultTimer.getOffsetEnd()), '"'])
+ list.extend((' offset="', str(defaultTimer.getOffsetBegin()), ',', str(defaultTimer.getOffsetEnd()), '"'))
# Counter
if defaultTimer.hasCounter():
- list.extend([' counter="', str(defaultTimer.getCounter()), '"'])
+ list.extend((' counter="', str(defaultTimer.getCounter()), '"'))
if defaultTimer.hasCounterFormatString():
- list.extend([' counterFormat="', str(defaultTimer.getCounterFormatString()), '"'])
+ list.extend((' counterFormat="', str(defaultTimer.getCounterFormatString()), '"'))
# Duplicate Description
if defaultTimer.getAvoidDuplicateDescription():
# Only display justplay if true
if defaultTimer.justplay:
- list.extend([' justplay="', str(defaultTimer.getJustplay()), '"'])
+ list.extend((' justplay="', str(defaultTimer.getJustplay()), '"'))
# Only display encoding if != utf-8
if defaultTimer.encoding != 'UTF-8':
- list.extend([' encoding="', str(defaultTimer.encoding), '"'])
+ list.extend((' encoding="', str(defaultTimer.encoding), '"'))
# Only display searchType if exact
if defaultTimer.searchType == "exact":
- list.extend([' searchType="', str(defaultTimer.searchType), '"'])
+ list.extend((' searchType="', str(defaultTimer.searchType), '"'))
# Only display searchCase if sensitive
if defaultTimer.searchCase == "sensitive":
- list.extend([' searchCase="', str(defaultTimer.searchCase), '"'])
+ list.extend((' searchCase="', str(defaultTimer.searchCase), '"'))
# Close still opened defaults tag
list.append('>\n')
# Services
for serviceref in defaultTimer.services:
- list.extend([' <serviceref>', serviceref, '</serviceref>'])
+ list.extend((' <serviceref>', serviceref, '</serviceref>'))
ref = ServiceReference(str(serviceref))
- list.extend([' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'])
+ list.extend((' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'))
# Bouquets
for bouquet in defaultTimer.bouquets:
- list.extend([' <bouquet>', str(bouquet), '</bouquet>'])
+ list.extend((' <bouquet>', str(bouquet), '</bouquet>'))
ref = ServiceReference(str(bouquet))
- list.extend([' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'])
+ list.extend((' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'))
# AfterEvent
if defaultTimer.hasAfterEvent():
list.append(' <afterevent')
if timespan[0] is not None:
list.append(' from="%02d:%02d" to="%02d:%02d"' % (timespan[0][0], timespan[0][1], timespan[1][0], timespan[1][1]))
- list.extend(['>', idx[action], '</afterevent>\n'])
+ list.extend(('>', idx[action], '</afterevent>\n'))
# Excludes
for title in defaultTimer.getExcludedTitle():
- list.extend([' <exclude where="title">', stringToXML(title), '</exclude>\n'])
+ list.extend((' <exclude where="title">', stringToXML(title), '</exclude>\n'))
for short in defaultTimer.getExcludedShort():
- list.extend([' <exclude where="shortdescription">', stringToXML(short), '</exclude>\n'])
+ list.extend((' <exclude where="shortdescription">', stringToXML(short), '</exclude>\n'))
for desc in defaultTimer.getExcludedDescription():
- list.extend([' <exclude where="description">', stringToXML(desc), '</exclude>\n'])
+ list.extend((' <exclude where="description">', stringToXML(desc), '</exclude>\n'))
for day in defaultTimer.getExcludedDays():
- list.extend([' <exclude where="dayofweek">', stringToXML(day), '</exclude>\n'])
+ list.extend((' <exclude where="dayofweek">', stringToXML(day), '</exclude>\n'))
# Includes
for title in defaultTimer.getIncludedTitle():
- list.extend([' <include where="title">', stringToXML(title), '</include>\n'])
+ list.extend((' <include where="title">', stringToXML(title), '</include>\n'))
for short in defaultTimer.getIncludedShort():
- list.extend([' <include where="shortdescription">', stringToXML(short), '</include>\n'])
+ list.extend((' <include where="shortdescription">', stringToXML(short), '</include>\n'))
for desc in defaultTimer.getIncludedDescription():
- list.extend([' <include where="description">', stringToXML(desc), '</include>\n'])
+ list.extend((' <include where="description">', stringToXML(desc), '</include>\n'))
for day in defaultTimer.getIncludedDays():
- list.extend([' <include where="dayofweek">', stringToXML(day), '</include>\n'])
+ list.extend((' <include where="dayofweek">', stringToXML(day), '</include>\n'))
# Tags
for tag in defaultTimer.tags:
- list.extend([' <tag>', stringToXML(tag), '</tag>\n'])
+ list.extend((' <tag>', stringToXML(tag), '</tag>\n'))
# Keep the list clean
if len(list) == 5:
# Iterate timers
for timer in timers:
# Common attributes (match, enabled)
- list.extend([' <timer name="', stringToXML(timer.name), '" match="', stringToXML(timer.match), '" enabled="', timer.getEnabled(), '"'])
+ list.extend((' <timer name="', stringToXML(timer.name), '" match="', stringToXML(timer.match), '" enabled="', timer.getEnabled(), '"'))
# Timespan
if timer.hasTimespan():
- list.extend([' from="', timer.getTimespanBegin(), '" to="', timer.getTimespanEnd(), '"'])
+ list.extend((' from="', timer.getTimespanBegin(), '" to="', timer.getTimespanEnd(), '"'))
# Duration
if timer.hasDuration():
- list.extend([' maxduration="', str(timer.getDuration()), '"'])
+ list.extend((' maxduration="', str(timer.getDuration()), '"'))
# Destination
if timer.hasDestination():
- list.extend([' location="', stringToXML(timer.destination), '"'])
+ list.extend((' location="', stringToXML(timer.destination), '"'))
# Offset
if timer.hasOffset():
if timer.isOffsetEqual():
- list.extend([' offset="', str(timer.getOffsetBegin()), '"'])
+ list.extend((' offset="', str(timer.getOffsetBegin()), '"'))
else:
- list.extend([' offset="', str(timer.getOffsetBegin()), ',', str(timer.getOffsetEnd()), '"'])
+ list.extend((' offset="', str(timer.getOffsetBegin()), ',', str(timer.getOffsetEnd()), '"'))
# Counter
if timer.hasCounter():
- list.extend([' lastBegin="', str(timer.getLastBegin()), '" counter="', str(timer.getCounter()), '" left="', str(timer.getCounterLeft()) ,'"'])
+ list.extend((' lastBegin="', str(timer.getLastBegin()), '" counter="', str(timer.getCounter()), '" left="', str(timer.getCounterLeft()) ,'"'))
if timer.hasCounterFormatString():
- list.extend([' lastActivation="', str(timer.getCounterLimit()), '"'])
- list.extend([' counterFormat="', str(timer.getCounterFormatString()), '"'])
+ list.extend((' lastActivation="', str(timer.getCounterLimit()), '"'))
+ list.extend((' counterFormat="', str(timer.getCounterFormatString()), '"'))
# Duplicate Description
if timer.getAvoidDuplicateDescription():
- list.extend([' avoidDuplicateDescription="', str(timer.getAvoidDuplicateDescription()), '"'])
+ list.extend((' avoidDuplicateDescription="', str(timer.getAvoidDuplicateDescription()), '"'))
# Only display justplay if true
if timer.justplay:
- list.extend([' justplay="', str(timer.getJustplay()), '"'])
+ list.extend((' justplay="', str(timer.getJustplay()), '"'))
# Only display encoding if != utf-8
if timer.encoding != 'UTF-8':
- list.extend([' encoding="', str(timer.encoding), '"'])
+ list.extend((' encoding="', str(timer.encoding), '"'))
# Only display searchType if exact
if timer.searchType == "exact":
- list.extend([' searchType="', str(timer.searchType), '"'])
+ list.extend((' searchType="', str(timer.searchType), '"'))
# Only display searchCase if sensitive
if timer.searchCase == "sensitive":
- list.extend([' searchCase="', str(timer.searchCase), '"'])
+ list.extend((' searchCase="', str(timer.searchCase), '"'))
+
+ # Only display overrideAlternatives if true
+ if timer.overrideAlternatives:
+ list.extend((' overrideAlternatives="', str(timer.getOverrideAlternatives()), '"'))
# Close still opened timer tag
list.append('>\n')
# Services
for serviceref in timer.services:
- list.extend([' <serviceref>', serviceref, '</serviceref>'])
+ list.extend((' <serviceref>', serviceref, '</serviceref>'))
ref = ServiceReference(str(serviceref))
- list.extend([' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'])
+ list.extend((' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'))
# Bouquets
for bouquet in timer.bouquets:
- list.extend([' <bouquet>', str(bouquet), '</bouquet>'])
+ list.extend((' <bouquet>', str(bouquet), '</bouquet>'))
ref = ServiceReference(str(bouquet))
- list.extend([' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'])
+ list.extend((' <!-- ', stringToXML(ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')), ' -->\n'))
# AfterEvent
if timer.hasAfterEvent():
list.append(' <afterevent')
if timespan[0] is not None:
list.append(' from="%02d:%02d" to="%02d:%02d"' % (timespan[0][0], timespan[0][1], timespan[1][0], timespan[1][1]))
- list.extend(['>', idx[action], '</afterevent>\n'])
+ list.extend(('>', idx[action], '</afterevent>\n'))
# Excludes
for title in timer.getExcludedTitle():
- list.extend([' <exclude where="title">', stringToXML(title), '</exclude>\n'])
+ list.extend((' <exclude where="title">', stringToXML(title), '</exclude>\n'))
for short in timer.getExcludedShort():
- list.extend([' <exclude where="shortdescription">', stringToXML(short), '</exclude>\n'])
+ list.extend((' <exclude where="shortdescription">', stringToXML(short), '</exclude>\n'))
for desc in timer.getExcludedDescription():
- list.extend([' <exclude where="description">', stringToXML(desc), '</exclude>\n'])
+ list.extend((' <exclude where="description">', stringToXML(desc), '</exclude>\n'))
for day in timer.getExcludedDays():
- list.extend([' <exclude where="dayofweek">', stringToXML(day), '</exclude>\n'])
+ list.extend((' <exclude where="dayofweek">', stringToXML(day), '</exclude>\n'))
# Includes
for title in timer.getIncludedTitle():
- list.extend([' <include where="title">', stringToXML(title), '</include>\n'])
+ list.extend((' <include where="title">', stringToXML(title), '</include>\n'))
for short in timer.getIncludedShort():
- list.extend([' <include where="shortdescription">', stringToXML(short), '</include>\n'])
+ list.extend((' <include where="shortdescription">', stringToXML(short), '</include>\n'))
for desc in timer.getIncludedDescription():
- list.extend([' <include where="description">', stringToXML(desc), '</include>\n'])
+ list.extend((' <include where="description">', stringToXML(desc), '</include>\n'))
for day in timer.getIncludedDays():
- list.extend([' <include where="dayofweek">', stringToXML(day), '</include>\n'])
+ list.extend((' <include where="dayofweek">', stringToXML(day), '</include>\n'))
# Tags
for tag in timer.tags:
- list.extend([' <tag>', stringToXML(tag), '</tag>\n'])
+ list.extend((' <tag>', stringToXML(tag), '</tag>\n'))
# End of Timer
list.append(' </timer>\n\n')
self.searchType = NoSave(ConfigSelection(choices = [("partial", _("partial match")), ("exact", _("exact match"))], default = timer.searchType))
self.searchCase = NoSave(ConfigSelection(choices = [("sensitive", _("case-sensitive search")), ("insensitive", _("case-insensitive search"))], default = timer.searchCase))
+ # Alternatives override
+ self.overrideAlternatives = NoSave(ConfigYesNo(default = timer.overrideAlternatives))
+
# Justplay
self.justplay = NoSave(ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "zap"}[int(timer.justplay)]))
getConfigListEntry(_("Search Type"), self.searchType),
getConfigListEntry(_("Search strictness"), self.searchCase),
getConfigListEntry(_("Timer Type"), self.justplay),
+ getConfigListEntry(_("Override found with alternative Service"), self.overrideAlternatives),
getConfigListEntry(_("Only match during Timespan"), self.timespan)
))
self.timer.searchType = self.searchType.value
self.timer.searchCase = self.searchCase.value
+ # Alternatives
+ self.timer.overrideAlternatives = self.overrideAlternatives.value
+
# Enabled
self.timer.enabled = self.enabled.value
list = self["config"].getList()
sname = args[0].toString()
- if self.typeSelection.value == "channels":
- # strip all after last : when adding a channel
+ if self.typeSelection.value == "channels" and not (args[0].flags & eServiceReference.isGroup):
+ # strip all after last : when adding a (non alternative) channel
pos = sname.rfind(':')
if pos != -1:
sname = sname[:pos+1]
sref = None
if service is not None:
service = str(service)
- # strip all after last :
- pos = service.rfind(':')
- if pos != -1:
- service = service[:pos+1]
-
- sref = ServiceReference(service)
+ myref = eServiceReference(service)
+ if not (myref.flags & eServiceReference.isGroup):
+ # strip all after last :
+ pos = service.rfind(':')
+ if pos != -1:
+ service = service[:pos+1]
+
+ sref = ServiceReference(myref)
if evt:
# timespan defaults to +- 1h
begin = evt.getBeginTime()-3600
# Needed to convert our timestamp back and forth
from time import localtime
+from enigma import eServiceReference
+
afterevent = {
AFTEREVENT.NONE: _("do nothing"),
AFTEREVENT.DEEPSTANDBY: _("go to deep standby"),
elif item[2] == 3: # Service
value = item[1]
- # strip all after last :
- pos = value.rfind(':')
- if pos != -1:
- value = value[:pos+1]
+ myref = eServiceReference(value)
+ if not (myref.flags & eServiceReference.isGroup):
+ # strip all after last :
+ pos = value.rfind(':')
+ if pos != -1:
+ value = value[:pos+1]
autotimer.services = [value]
elif item[2] == 4: # AfterEvent