Skip to content

Commit 4c98ad1

Browse files
committed
Add new tags to metadata processing.
Adds in several new tags to the metadata parser, for support of recorded content.
1 parent 4c43ec7 commit 4c98ad1

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

mythtv/bindings/python/MythTV/dataheap.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,16 @@ def _allow_change(self, tag, overwrite):
286286
return
287287

288288
# pull direct matches
289-
for tag in ('title', 'subtitle', 'description'):
289+
for tag in ('title', 'subtitle', 'description', 'chanid',
290+
'starttime', 'recgroup', 'playgroup', 'seriesid',
291+
'programid', 'storagegroup'):
290292
if metadata[tag] and _allow_change(self, tag, overwrite):
291293
self[tag] = metadata[tag]
292294

293295
# pull renamed matches
294-
for tagf,tagt in (('userrating','stars'),):
296+
for tagf,tagt in (('userrating','stars'), ('filename', 'basename'),
297+
('startts','progstart'),('endts','progend'),
298+
('recstartts','starttime'),('recendts','endtime')):
295299
if metadata[tagf] and _allow_change(self, tagt, overwrite):
296300
self[tagt] = metadata[tagf]
297301

@@ -324,12 +328,16 @@ def exportMetadata(self):
324328
metadata = VideoMetadata()
325329

326330
# pull direct matches
327-
for tag in ('title', 'subtitle', 'description'):
331+
for tag in ('title', 'subtitle', 'description', 'chanid',
332+
'recgroup', 'playgroup', 'seriesid', 'programid',
333+
'storagegroup'):
328334
if self[tag]:
329335
metadata[tag] = self[tag]
330336

331337
# pull translated matches
332-
for tagf,tagt in (('stars','userrating'),):
338+
for tagt,tagf in (('userrating','stars'), ('filename', 'basename'),
339+
('startts','progstart'),('endts','progend'),
340+
('recstartts','starttime'),('recendts','endtime'),):
333341
if self[tagf]:
334342
metadata[tagt] = self[tagf]
335343

mythtv/bindings/python/MythTV/system.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ class Metadata( DictData ):
148148
'language':3, 'releasedate':5, 'lastupdated':6,
149149
'userrating':1, 'tracnum':0, 'popularity':0,
150150
'budget':0, 'revenue':0, 'year':0,
151-
'runtime':0, 'runtimesecs':0}
151+
'runtime':0, 'runtimesecs':0, 'filename':3,
152+
'chanid':0, 'channum':3, 'callsign':3,
153+
'channame':3, 'playbackfilters':3,'recgroup':3,
154+
'playgroup':3, 'seriesid':3, 'programid':3,
155+
'startts':5, 'endts':5, 'storagegroup':3,
156+
'recstartts':5, 'recendts':5}
152157

153158
class _subgroup_name( list ):
154159
def __init__(self, xml):
@@ -245,7 +250,11 @@ class VideoMetadata( Metadata ):
245250
'episode','dvdseason','dvdepisode','inetref','imdb',
246251
'tmsref','homepage','trailer','language', 'releasedate',
247252
'lastupdated','userrating','popularity', 'budget',
248-
'revenue','year','runtime']
253+
'revenue','year','runtime','filename','chanid',
254+
'channum','callsign','channame','playbackfilters',
255+
'recgroup','playgroup','seriesid','programid',
256+
'startts','endts','storagegroup','recstartts',
257+
'recendts']
249258
_groups = ['certifications','categories','countries',
250259
'studios','people','images']
251260
def _process(self, xml):

0 commit comments

Comments
 (0)