Better exception logging when trying to guess information from filename #34

pull/56/merge
morpheus65535 7 years ago
parent 8063ad22e6
commit 49f06ad51b

@ -16,7 +16,12 @@ else:
region.configure('dogpile.cache.dbm', arguments={'filename': os.path.join(os.path.dirname(__file__), 'data/cache/cachefile.dbm')})
def download_subtitle(path, language, hi, providers, providers_auth):
try:
video = scan_video(path)
except Exception as e:
logging.exception('Error trying to extract information from this filename: ' + path)
return None
else:
best_subtitles = download_best_subtitles([video], {Language(language)}, providers=providers, hearing_impaired=hi, provider_configs=providers_auth)
try:
best_subtitle = best_subtitles[video][0]

Loading…
Cancel
Save