file.close()
def getNextZapTime(self):
- llen = len(self.timer_list)
- idx = 0
now = time.time()
- while idx < llen:
- timer = self.timer_list[idx]
+ for timer in self.timer_list:
if not timer.justplay or timer.begin < now:
- idx += 1
- else:
- return timer.begin
+ continue
+ return timer.begin
return -1
def getNextRecordingTime(self):
- llen = len(self.timer_list)
- idx = 0
now = time.time()
- while idx < llen:
- timer = self.timer_list[idx]
+ for timer in self.timer_list:
if timer.justplay or timer.begin < now:
- idx += 1
- else:
- return timer.begin
+ continue
+ return timer.begin
return -1
def record(self, entry):
sref.setUnsignedData(5, 0)
sref.setUnsignedData(6, 0)
check = x.service_ref.ref.toCompareString() == str(service)
+ num = 0
+ if check:
+ check = False
+ event = eEPGCache.getInstance().lookupEventId(sref, eventid)
+ num = event and event.getNumOfLinkageServices() or 0
sref.setUnsignedData(1, sid)
sref.setUnsignedData(2, tsid)
sref.setUnsignedData(5, parent_sid)
sref.setUnsignedData(6, parent_tsid)
+ for cnt in range(num):
+ subservice = event.getLinkageService(sref, cnt)
+ if sref.toCompareString() == subservice.toCompareString():
+ check = True
+ break
if check:
#if x.eit is not None and x.repeated == 0:
# if x.eit == eventid: