mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 09:02:44 +08:00
Fixed Brazilian Portuguese audio language match with Radarr.
This commit is contained in:
parent
6e46379fc2
commit
aaa8b48dad
1 changed files with 5 additions and 1 deletions
|
@ -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']]
|
||||
|
||||
|
|
Loading…
Reference in a new issue