end, # Proposed End
None, # Proposed Disabled
sref, # Proposed ServiceReference
- None, # Proposed afterEvent
- None, # Proposed justplay
- None # Proposed dirname, can we get anything useful here?
+ None, # Proposed afterEvent
+ None, # Proposed justplay
+ None, # Proposed dirname, can we get anything useful here?
+ [] #
)
def addAutotimerFromService(session, service = None):
else:
begin = end = 0
+ from os.path import dirname
+ path = dirname(service.getPath())
+ if not path == '/':
+ path += '/'
+
+ tags = info.getInfoString(service, iServiceInformation.sTags)
+ tags = tags and tags.split(' ') or []
+
# XXX: we might want to make sure that we actually collected any data because the importer does not do so :-)
session.openWithCallback(
end, # Proposed End
None, # Proposed Disabled
sref, # Proposed ServiceReference
- None, # Proposed afterEvent
- None, # Proposed justplay
- None # Proposed dirname, can we get anything useful here?
+ None, # Proposed afterEvent
+ None, # Proposed justplay
+ path, # Proposed dirname
+ tags # Proposed tags
)
def importerCallback(ret):
cur.service_ref,
cur.afterEvent,
cur.justplay,
- cur.dirname
+ cur.dirname,
+ cur.tags
)
def cancel(self):
<widget name="key_blue" position="420,235" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
</screen>"""
- def __init__(self, session, autotimer, name, begin, end, disabled, sref, afterEvent, justplay, dirname):
+ def __init__(self, session, autotimer, name, begin, end, disabled, sref, afterEvent, justplay, dirname, tags):
Screen.__init__(self, session)
# Keep AutoTimer
True
))
+ if tags:
+ list.append(
+ SelectionEntryComponent(
+ ': '.join([_("Tags"), ', '.join(tags)]),
+ tags,
+ 7,
+ True
+ ))
+
self["list"] = SelectionList(list)
# Define Actions
self.autotimer.justplay = item[1]
elif item[2] == 6: # Location
self.autotimer.destination = item[1]
+ elif item[2] == 7: # Tags
+ self.autotimer.tags = item[1]
if self.autotimer.match == "":
self.session.openWithCallback(