X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=RecordTimer.py;h=4907f64e75a80d05635a91b5b71c28c9ede2ac56;hp=cba161e3f17496f1687a98cf6fa9e39e2b0aa63b;hb=26ffb5f9f32d3939c8f4bb6601bfed424bd13a14;hpb=e78d0c321298ac38b08a5be7a1bc7d74368142bd;ds=sidebyside diff --git a/RecordTimer.py b/RecordTimer.py index cba161e..4907f64 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -14,7 +14,7 @@ import xml.etree.cElementTree import NavigationInstance from ServiceReference import ServiceReference -from time import localtime, strftime, localtime, ctime, time +from time import localtime, strftime, ctime, time from bisect import insort # ok, for descriptions etc we have: @@ -218,7 +218,8 @@ class RecordTimerEntry(timer.TimerEntry, object): # because another recording at the same time on another service can try to record the same event # i.e. cable / sat.. then the second recording needs an own extension... when we create the file # here than calculateFilename is happy - open(self.Filename + ".ts", "w").close() + if not self.justplay: + open(self.Filename + ".ts", "w").close() # fine. it worked, resources are allocated. self.next_activation = self.begin self.backoff = 0 @@ -689,7 +690,7 @@ class RecordTimer(timer.Timer): chktimecmp_end = chktimecmp + (duration / 60) time = localtime(x.begin) for y in (0, 1, 2, 3, 4, 5, 6): - if x.repeated & (2 ** y) and (x.begin <= begin or begin <= x.begin <= end): + if x.repeated & (1 << y) and (x.begin <= begin or begin <= x.begin <= end): timecmp = y * 1440 + time.tm_hour * 60 + time.tm_min if timecmp <= chktimecmp < (timecmp + ((x.end - x.begin) / 60)): time_match = ((timecmp + ((x.end - x.begin) / 60)) - chktimecmp) * 60