Permalink
Browse files

Use proper type when exporting Metadata objects from database classes.

  • Loading branch information...
1 parent 3d1260b commit 361834a58512297aa5d6296ef8c5321469ea37b2 @wagnerrp wagnerrp committed May 23, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 mythtv/bindings/python/MythTV/dataheap.py
@@ -437,12 +437,12 @@ def exportMetadata(self):
name = member.name
role = ' '.join([word.capitalize() for word in member.role.split('_')])
if role=='Writer': role = 'Author'
- metadata.people.append({'name':name, 'job':role})
+ metadata.people.append(OrdDict((('name',name), ('job',role))))
for arttype in ['coverart', 'fanart', 'banner']:
art = getattr(self.artwork, arttype)
if art:
- metadata.images.append({'type':arttype, 'filename':art})
+ metadata.images.append(OrdDict((('type',arttype), ('filename',art))))
return metadata
@@ -1019,11 +1019,11 @@ def exportMetadata(self):
# pull director
if self.director:
- metadata.people.append({'name':self.director, 'job':'Director'})
+ metadata.people.append(OrdDict((('name',self.director), ('job','Director'))))
# pull actors
for actor in self.cast:
- metadata.people.append({'name':actor.cast, 'job':'Actor'})
+ metadata.people.append(OrdDict((('name',actor.cast), ('job','Actor'))))
# pull genres
for genre in self.genre:
@@ -1037,7 +1037,7 @@ def exportMetadata(self):
for arttype in ['coverart', 'fanart', 'banner', 'screenshot']:
art = getattr(self, arttype)
if art:
- metadata.images.append({'type':arttype, 'filename':art})
+ metadata.images.append(OrdDict((('type',arttype), ('filename',art))))
return metadata

0 comments on commit 361834a

Please sign in to comment.