Browse Source

add the recording date if provided..

main
John-Mark Gurney 3 years ago
parent
commit
4e6a1862c3
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      pyvr.py

+ 8
- 4
pyvr.py View File

@@ -2,8 +2,8 @@
# Copyright 2008 John-Mark Gurney <jmg@funktaht.com> # Copyright 2008 John-Mark Gurney <jmg@funktaht.com>
'''PVR Interface''' '''PVR Interface'''


__version__ = '$Change$'
# $Id$
__version__ = '$Change: 1743 $'
# $Id: //depot/python/pymeds/main/pyvr.py#10 $


from DIDLLite import Container, Item, VideoItem, Resource from DIDLLite import Container, Item, VideoItem, Resource
from FSStorage import registerklassfun, FSObject from FSStorage import registerklassfun, FSObject
@@ -54,6 +54,10 @@ class PYVRShow(VideoItem):
self.res = Resource(url, self.res = Resource(url,
'http-get:*:%s:*' % self.info['mimetype']) 'http-get:*:%s:*' % self.info['mimetype'])
self.res.duration = self.info['duration'] self.res.duration = self.info['duration']
try:
self.date = self.info['startdateiso']
except KeyError:
pass


def doUpdate(self): def doUpdate(self):
pass pass
@@ -63,8 +67,8 @@ import xml.sax.handler
from xml.sax.saxutils import unescape from xml.sax.saxutils import unescape


class RecordingXML(xml.sax.handler.ContentHandler): class RecordingXML(xml.sax.handler.ContentHandler):
dataels = ('title', 'subtitle', 'duration', 'mimetype', 'link',
'delete', )
dataels = ('title', 'startdateiso', 'subtitle', 'duration',
'mimetype', 'link', 'delete', )


def __init__(self): def __init__(self):
self.shows = {} self.shows = {}


Loading…
Cancel
Save