more changes for service groups (replacement for zapping alternatives
[enigma2.git] / lib / python / Screens / EventView.py
index fa4bb59..82bca9f 100644 (file)
@@ -3,7 +3,7 @@ from Components.ActionMap import ActionMap
 from Components.Button import Button
 from Components.Label import Label
 from Components.ScrollLabel import ScrollLabel
-from enigma import eServiceEventPtr, eEPGCachePtr, eEPGCache, eTimer
+from enigma import eServiceEventPtr, eEPGCache, eTimer, eServiceReference
 from ServiceReference import ServiceReference
 from RecordTimer import RecordTimerEntry, parseEvent
 from TimerEntry import TimerEntry
@@ -14,7 +14,7 @@ class EventViewBase:
                self.similarEPGCB = similarEPGCB
                self.cbFunc = callback
                self.currentService=Ref
-               self.isRecording = len(Ref.ref.getPath())
+               self.isRecording = (not Ref.ref.flags & eServiceReference.isGroup) and len(Ref.ref.getPath())
                self.event = Event
                self["epg_description"] = ScrollLabel()
                self["datetime"] = Label()
@@ -59,7 +59,7 @@ class EventViewBase:
 
        def timerAdd(self):
                if not self.isRecording:
-                       newEntry = RecordTimerEntry(self.currentService, *parseEvent(self.event))
+                       newEntry = RecordTimerEntry(self.currentService, checkOldTimers = True, *parseEvent(self.event))
                        self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry)
 
        def timerEditFinished(self, answer):
@@ -88,9 +88,9 @@ class EventViewBase:
                        return 1
 
        def setEvent(self, event):
+               self.event = event
                if event is None:
                        return
-               self.event = event
                text = event.getEventName()
                short = event.getShortDescription()
                ext = event.getExtendedDescription()
@@ -133,7 +133,7 @@ class EventViewBase:
                        self["key_red"].setText(_("Similar"))
 
        def openSimilarList(self):
-               if self.similarEPGCB is not None:
+               if self.similarEPGCB is not None and len(self["key_red"].getText()):
                        id = self.event and self.event.getEventId()
                        refstr = str(self.currentService)
                        if id is not None: