mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-07 11:58:01 -05:00
Bugfix for NoneType error when looking for genres on TVRage
This commit is contained in:
parent
1cb293f3d6
commit
88640b4af6
@ -596,20 +596,22 @@ class TVRage:
|
|||||||
|
|
||||||
self._setShowData(sid, tag, value)
|
self._setShowData(sid, tag, value)
|
||||||
|
|
||||||
# Parse genre data
|
try:
|
||||||
log().debug('Getting genres of %s' % (sid))
|
# Parse genre data
|
||||||
|
log().debug('Getting genres of %s' % (sid))
|
||||||
|
for genre in seriesInfoEt.find('genres'):
|
||||||
|
if genre.tag in remap_keys:
|
||||||
|
tag = remap_keys[genre.tag.lower()]
|
||||||
|
else:
|
||||||
|
tag = genre.tag.lower()
|
||||||
|
|
||||||
for genre in seriesInfoEt.find('genres'):
|
value = genre.text
|
||||||
if genre.tag in remap_keys:
|
if value is not None:
|
||||||
tag = remap_keys[genre.tag.lower()]
|
value = self._cleanData(value)
|
||||||
else:
|
|
||||||
tag = genre.tag.lower()
|
|
||||||
|
|
||||||
value = genre.text
|
self._setShowData(sid, tag, value)
|
||||||
if value is not None:
|
except Exception:
|
||||||
value = self._cleanData(value)
|
log().debug('No genres for %s' % (sid))
|
||||||
|
|
||||||
self._setShowData(sid, tag, value)
|
|
||||||
|
|
||||||
# Parse episode data
|
# Parse episode data
|
||||||
log().debug('Getting all episodes of %s' % (sid))
|
log().debug('Getting all episodes of %s' % (sid))
|
||||||
|
Loading…
Reference in New Issue
Block a user