Private GIT

Skip to content
Snippets Groups Projects
Commit 13c75e4e authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Merge branch 'develop'

parents 2996c9d4 8426a061
No related branches found
No related tags found
No related merge requests found
......@@ -1358,13 +1358,20 @@ def headURL(url, params=None, headers={}, timeout=30, session=None, json=False,
except requests.exceptions.HTTPError, e:
logger.log(u"HTTP error in headURL {0}. Error: {1}".format(url,e.errno), logger.WARNING)
pass
except requests.exceptions.ConnectionError, e:
logger.log(u"Connection error to {0}. Error: {1}".format(url,e.message), logger.WARNING)
pass
except requests.exceptions.Timeout, e:
logger.log(u"Connection timed out accessing {0}. Error: {1}".format(url,e.message), logger.WARNING)
pass
except requests.exceptions.ContentDecodingError:
logger.log(u"Content-Encoding was gzip, but content was not compressed", logger.WARNING)
pass
except Exception as e:
logger.log(u"Unknown exception in headURL {0}. Error: {1}".format(url,e.message), logger.WARNING)
logger.log(traceback.format_exc(), logger.WARNING)
pass
return False
......@@ -1408,6 +1415,9 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
except requests.exceptions.Timeout, e:
logger.log(u"Connection timed out accessing {0}. Error: {1}".format(url,e.message), logger.WARNING)
return
except requests.exceptions.ContentDecodingError:
logger.log(u"Content-Encoding was gzip, but content was not compressed", logger.WARNING)
return
except Exception as e:
logger.log(u"Unknown exception in getURL {0}. Error: {1}".format(url,e.message), logger.WARNING)
logger.log(traceback.format_exc(), logger.WARNING)
......
......@@ -89,6 +89,10 @@ def wantedLanguages(sqlLike = False):
def subtitlesLanguages(video_path):
"""Return a list detected subtitles for the given video file"""
resultList = []
if sickbeard.SUBTITLES_DIR and ek.ek(os.path.exists, sickbeard.SUBTITLES_DIR):
video_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, ek.ek(os.path.basename, video_path))
languages = subliminal.video.scan_subtitle_languages(video_path)
for language in languages:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment