git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
translate "Services" and "Providers" (german umlaute don't word... why?)
[enigma2.git]
/
lib
/
python
/
Screens
/
EpgSelection.py
diff --git
a/lib/python/Screens/EpgSelection.py
b/lib/python/Screens/EpgSelection.py
index def51d49d66e9affa2ccb384294bf0b1b17c316a..4d288b0047ec8a6fb0aab1b5cb86aa20fe520723 100644
(file)
--- a/
lib/python/Screens/EpgSelection.py
+++ b/
lib/python/Screens/EpgSelection.py
@@
-5,7
+5,7
@@
from Components.ActionMap import ActionMap
from Screens.EventView import EventView
from enigma import eServiceReference, eServiceEventPtr
from Screens.FixedMenu import FixedMenu
from Screens.EventView import EventView
from enigma import eServiceReference, eServiceEventPtr
from Screens.FixedMenu import FixedMenu
-from RecordTimer import RecordTimerEntry
+from RecordTimer import RecordTimerEntry
, parseEvent
from TimerEdit import TimerEditList
from TimerEntry import TimerEntry
from ServiceReference import ServiceReference
from TimerEdit import TimerEditList
from TimerEntry import TimerEntry
from ServiceReference import ServiceReference
@@
-21,6
+21,11
@@
class EPGSelection(Screen):
class ChannelActionMap(ActionMap):
def action(self, contexts, action):
ActionMap.action(self, contexts, action)
class ChannelActionMap(ActionMap):
def action(self, contexts, action):
ActionMap.action(self, contexts, action)
+
+ self["key_red"] = Button("")
+ self["key_green"] = Button(_("Add timer"))
+ self["key_yellow"] = Button("")
+ self["key_blue"] = Button("")
self["actions"] = ChannelActionMap(["EPGSelectActions", "OkCancelActions"],
{
self["actions"] = ChannelActionMap(["EPGSelectActions", "OkCancelActions"],
{
@@
-44,24
+49,15
@@
class EPGSelection(Screen):
self.session.open(EventView, event, self.currentService, self.eventViewCallback)
def timerAdd(self):
self.session.open(EventView, event, self.currentService, self.eventViewCallback)
def timerAdd(self):
- epg = self["list"].getCurrent()
+ event = self["list"].getCurrent()
+
+ if event is None:
+ return
- if (epg == None):
- description = "unknown event"
- else:
- description = epg.getEventName()
- # FIXME we need a timestamp here:
- begin = epg.getBeginTime()
-
- print begin
- print epg.getDuration()
- end = begin + epg.getDuration()
-
-
# FIXME only works if already playing a service
serviceref = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference())
# FIXME only works if already playing a service
serviceref = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference())
- newEntry = RecordTimerEntry(
begin, end, serviceref, epg, description
)
+ newEntry = RecordTimerEntry(
serviceref, *parseEvent(event)
)
self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry)
def timerEditFinished(self, answer):
self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry)
def timerEditFinished(self, answer):