summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-10-28 22:15:35 -0400
committermorpheus65535 <[email protected]>2021-10-28 22:15:35 -0400
commitaaa8b48dad3a1d4de5a8f2f04fcc96cf1fb5fb3a (patch)
tree3ca4efdf6180c51b1e3992ece553f75201fba11e
parent6e46379fc2c37ac4930f764f1953cd2e9f14d115 (diff)
downloadbazarr-aaa8b48dad3a1d4de5a8f2f04fcc96cf1fb5fb3a.tar.gz
bazarr-aaa8b48dad3a1d4de5a8f2f04fcc96cf1fb5fb3a.zip
Fixed Brazilian Portuguese audio language match with Radarr.v1.0.1-beta.5
-rw-r--r--bazarr/get_movies.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bazarr/get_movies.py b/bazarr/get_movies.py
index 0ae5b17c2..3ff4bd951 100644
--- a/bazarr/get_movies.py
+++ b/bazarr/get_movies.py
@@ -16,6 +16,7 @@ from get_rootfolder import check_radarr_rootfolder
from get_subtitle import movies_download_subtitles
from database import get_exclusion_clause, TableMovies
from event_handler import event_stream, show_progress, hide_progress
+from get_languages import language_from_alpha2
headers = {"User-Agent": os.environ["SZ_USER_AGENT"]}
@@ -450,7 +451,10 @@ def movieParser(movie, action, tags_dict, movie_default_profile, audio_profiles)
for item in movie['movieFile']['languages']:
if isinstance(item, dict):
if 'name' in item:
- audio_language.append(item['name'])
+ language = item['name']
+ if item['name'] == 'Portuguese (Brazil)':
+ language = language_from_alpha2('pb')
+ audio_language.append(language)
tags = [d['label'] for d in tags_dict if d['id'] in movie['tags']]