SpiffyTitles: Fix wrong return value 'None' in get_source_by_url()

This commit is contained in:
kerozene 2015-12-13 02:58:07 +11:00
parent 8883df571c
commit cf97950568
1 changed files with 5 additions and 2 deletions

View File

@ -1221,7 +1221,7 @@ class SpiffyTitles(callbacks.Plugin):
if retries >= max_retries:
log.debug("SpiffyTitles: hit maximum retries for %s" % url)
return None
return (None, False)
log.debug("SpiffyTitles: attempt #%s for %s" % (retries, url))
@ -1257,7 +1257,7 @@ class SpiffyTitles(callbacks.Plugin):
if text:
return (text, is_redirect)
else:
log.debug("SpiffyTitles: empty content from %s" % (url))
log.debug("SpiffyTitles: empty content from %s" % (url))
else:
log.debug("SpiffyTitles: unacceptable mime type %s for url %s" % (content_type, url))
@ -1286,6 +1286,9 @@ class SpiffyTitles(callbacks.Plugin):
except requests.exceptions.InvalidURL as e:
log.error("SpiffyTitles InvalidURL: %s" % (str(e)))
return (None, False)
def get_base_domain(self, url):
"""
Returns the FQDN comprising the top two domain levels