# Show ServiceName instead of ServiceReference
from ServiceReference import ServiceReference
-# addAutotimerFromService
-from enigma import eServiceCenter, iServiceInformation
+# addAutotimerFromService, AutoTimerChannelSelection
+from enigma import eServiceCenter, eServiceReference, iServiceInformation
# Default Record Directory
from Tools import Directories
SimpleChannelSelection.__init__(self, session, title)
self.skinName = "SimpleChannelSelection"
- def channelSelected(self): # just return selected service
+ def channelSelected(self):
ref = self.getCurrentSelection()
if (ref.flags & 7) == 7:
self.close(ref)
# Asking the user if this is what he wants might be better though
self.close(self.servicePath[-1])
+class AutoTimerChannelSelection(SimpleChannelSelection):
+ def __init__(self, session, autotimer):
+ SimpleChannelSelection.__init__(self, session, _("Channel Selection"))
+ self.skinName = "SimpleChannelSelection"
+ self.autotimer = autotimer
+
+ self["ChannelSelectEPGActions"] = ActionMap(["ChannelSelectEPGActions"],
+ {
+ "showEPGList": self.channelSelected
+ }
+ )
+
+ def channelSelected(self):
+ ref = self.getCurrentSelection()
+ if (ref.flags & 7) == 7:
+ self.enterPath(ref)
+ elif not (ref.flags & eServiceReference.isMarker):
+ self.session.open(
+ AutoTimerEPGSelection,
+ ref
+ )
+
class AutoTimerEPGSelection(EPGSelection):
def __init__(self, *args):
EPGSelection.__init__(self, *args)
from Screens.HelpMenu import HelpableScreen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
-from AutoTimerEditor import AutoTimerEditor
+from AutoTimerEditor import AutoTimerEditor, AutoTimerChannelSelection
from AutoTimerSettings import AutoTimerSettings
from AutoTimerPreview import AutoTimerPreview
from AutoTimerImporter import AutoTimerImportSelector
def menu(self):
list = [
(_("Preview"), "preview"),
- (_("Import"), "import"),
+ (_("Import existing Timer"), "import"),
+ (_("Import from EPG"), "import_epg"),
(_("Setup"), "setup"),
(_("Edit new timer defaults"), "defaults"),
]
AutoTimerImportSelector,
newTimer
)
+ elif ret == "import_epg":
+ self.session.open(
+ AutoTimerChannelSelection,
+ self.autotimer
+ )
elif ret == "setup":
self.session.open(
AutoTimerSettings