diff options
author | morpheus65535 <[email protected]> | 2018-10-04 20:24:22 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2018-10-04 20:24:22 -0400 |
commit | bcd39143243253eae785a33a7683705a9cb3929b (patch) | |
tree | 285f9469f7012281e2b1617e210aa81b7327f3f3 | |
parent | 203d75a47006b70d8f718d6ca5e13ae4571fbfb6 (diff) | |
download | bazarr-bcd39143243253eae785a33a7683705a9cb3929b.tar.gz bazarr-bcd39143243253eae785a33a7683705a9cb3929b.zip |
Refactory of history logging
-rw-r--r-- | get_subtitle.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/get_subtitle.py b/get_subtitle.py index 1158a90cc..949c06354 100644 --- a/get_subtitle.py +++ b/get_subtitle.py @@ -79,10 +79,10 @@ def download_subtitle(path, language, hi, providers, providers_auth, sceneName, logging.error('Error saving subtitles file to disk.') return None else: - downloaded_provider = subtitle.provider_name - downloaded_language = language_from_alpha3(language) - downloaded_language_code2 = alpha2_from_alpha3(language) - downloaded_language_code3 = language + downloaded_provider = result[0].provider_name + downloaded_language = language_from_alpha3(result[0].language.alpha3) + downloaded_language_code2 = alpha2_from_alpha3(result[0].language.alpha3) + downloaded_language_code3 = result[0].language.alpha3 downloaded_path = get_subtitle_path(path, language=lang_obj) if used_sceneName == True: message = downloaded_language + " subtitles downloaded from " + downloaded_provider + " with a score of " + unicode(score) + "% using this scene name: " + sceneName @@ -222,10 +222,10 @@ def manual_download_subtitle(path, language, hi, subtitle, provider, providers_a logging.exception('Error saving subtitles file to disk.') return None else: - downloaded_provider = subtitle.provider_name - downloaded_language = language_from_alpha3(language) - downloaded_language_code2 = alpha2_from_alpha3(language) - downloaded_language_code3 = language + downloaded_provider = result[0].provider_name + downloaded_language = language_from_alpha3(result[0].language.alpha3) + downloaded_language_code2 = alpha2_from_alpha3(result[0].language.alpha3) + downloaded_language_code3 = result[0].language.alpha3 downloaded_path = get_subtitle_path(path, language=lang_obj) message = downloaded_language + " subtitles downloaded from " + downloaded_provider + " with a score of " + unicode(score) + "% using manual search." |