Permalink
Browse files

Allow bad Metadata tags to be bypassed

This is in response to a change in the TMDb API that resulted in the
grabber returning bad data for the 'lastupdated' field.  If a field
returns bad data, skip over it and continue processing the rest of the
result.

(cherry picked from commit 15b0ffc)
  • Loading branch information...
1 parent fdfc989 commit 19a63d462aa8614851062f2681ba97d0eff357c6 @wagnerrp wagnerrp committed Oct 30, 2011
Showing with 12 additions and 10 deletions.
  1. +12 −10 mythtv/bindings/python/MythTV/system.py
@@ -147,16 +147,18 @@ def _fillNone(self):
def _process(self, xml):
for element in xml.getchildren():
- if element.tag in self:
- if (element.text == '') or (element.text is None):
- self[element.tag] = None
- else:
- self[element.tag] = \
- self._trans[self._global_type[element.tag]]\
- (element.text)
- if element.tag in self._groups:
- self.__dict__[element.tag] = \
- eval('self.%s(element)' % element.tag.capitalize())
+ try:
+ if element.tag in self:
+ if (element.text == '') or (element.text is None):
+ self[element.tag] = None
+ else:
+ self[element.tag] = \
+ self._trans[self._global_type[element.tag]]\
+ (element.text)
+ if element.tag in self._groups:
+ self.__dict__[element.tag] = \
+ eval('self.%s(element)' % element.tag.capitalize())
+ except: pass
class VideoMetadata( Metadata ):
_field_order = ['title','subtitle','tagline','description','season',

0 comments on commit 19a63d4

Please sign in to comment.