From 4e6a1862c372252cf7c9dbb83bb8f83698cb007d Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 19 Jan 2022 15:09:42 -0800 Subject: [PATCH] add the recording date if provided.. --- pyvr.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyvr.py b/pyvr.py index bd1a96d..171a8d8 100644 --- a/pyvr.py +++ b/pyvr.py @@ -2,8 +2,8 @@ # Copyright 2008 John-Mark Gurney '''PVR Interface''' -__version__ = '$Change$' -# $Id$ +__version__ = '$Change: 1743 $' +# $Id: //depot/python/pymeds/main/pyvr.py#10 $ from DIDLLite import Container, Item, VideoItem, Resource from FSStorage import registerklassfun, FSObject @@ -54,6 +54,10 @@ class PYVRShow(VideoItem): self.res = Resource(url, 'http-get:*:%s:*' % self.info['mimetype']) self.res.duration = self.info['duration'] + try: + self.date = self.info['startdateiso'] + except KeyError: + pass def doUpdate(self): pass @@ -63,8 +67,8 @@ import xml.sax.handler from xml.sax.saxutils import unescape class RecordingXML(xml.sax.handler.ContentHandler): - dataels = ('title', 'subtitle', 'duration', 'mimetype', 'link', - 'delete', ) + dataels = ('title', 'startdateiso', 'subtitle', 'duration', + 'mimetype', 'link', 'delete', ) def __init__(self): self.shows = {}