Skip to content

Commit

Permalink
Fix invalid literal for int() with base 10 when parsing metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
labrys committed May 28, 2016
1 parent 066279b commit 8a07252
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sickbeard/metadata/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,9 @@ def retrieveShowMetadata(self, folder):

name = showXML.findtext('title')

if showXML.findtext('tvdbid') is not None:
if showXML.findtext('tvdbid'):
indexer_id = int(showXML.findtext('tvdbid'))
elif showXML.findtext('id') is not None:
elif showXML.findtext('id'):
indexer_id = int(showXML.findtext('id'))
else:
logger.log(u"Empty <id> or <tvdbid> field in NFO, unable to find a ID", logger.WARNING)
Expand All @@ -937,7 +937,7 @@ def retrieveShowMetadata(self, folder):
return empty_return

indexer = None
if showXML.find('episodeguide/url') is not None:
if showXML.find('episodeguide/url'):
epg_url = showXML.findtext('episodeguide/url').lower()
if str(indexer_id) in epg_url:
if 'thetvdb.com' in epg_url:
Expand Down

0 comments on commit 8a07252

Please sign in to comment.