summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Wagner <rwagner@mythtv.org>2011-10-30 02:07:44 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2011-10-30 02:07:44 (GMT)
commit19a63d462aa8614851062f2681ba97d0eff357c6 (patch)
tree5ce7e5dbfec34a948063120c4a26704e8d6a5aab
parentfdfc989ebfe161fd58d977b38a4f2dd75aff1880 (diff)
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 15b0ffc383b87173708ccd867e0f0fdddceec4da)
-rw-r--r--mythtv/bindings/python/MythTV/system.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/mythtv/bindings/python/MythTV/system.py b/mythtv/bindings/python/MythTV/system.py
index 332934d..348062f 100644
--- a/mythtv/bindings/python/MythTV/system.py
+++ b/mythtv/bindings/python/MythTV/system.py
@@ -147,16 +147,18 @@ class Metadata( DictData ):
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',