Re-add time property, needed for setting the mtime on the saved file.

This commit is contained in:
Stefan Bethke 2017-04-16 21:45:39 +02:00
parent 82e82c3e79
commit eaef3a88bf

View file

@ -188,6 +188,7 @@ class TivoItem:
self.description = trimDescription(getTagText(i, "Description")) self.description = trimDescription(getTagText(i, "Description"))
d = getTagText(i, "CaptureDate") d = getTagText(i, "CaptureDate")
self.date = datetime.datetime.fromtimestamp(int(d, 16), pytz.utc) self.date = datetime.datetime.fromtimestamp(int(d, 16), pytz.utc)
self.time = int(d, base=0)
est = pytz.timezone('US/Eastern') est = pytz.timezone('US/Eastern')
eastern = roundTime(self.date, 15*60).astimezone(est) eastern = roundTime(self.date, 15*60).astimezone(est)
self.datestr = self.date.strftime("%Y%m%d-%H%M") self.datestr = self.date.strftime("%Y%m%d-%H%M")