1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-29 11:06:02 +00:00

Fix issues of manually searching. It will download wrong subtitles for some languages

This commit is contained in:
LASER-Yi 2021-03-27 20:47:06 +08:00
parent 0ada132a5c
commit 535dcd55a8

View file

@ -768,7 +768,7 @@ def series_download_subtitles(no):
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace(episode['path']), result = download_subtitle(path_mappings.path_replace(episode['path']),
str(alpha3_from_alpha2(language.split(':')[0])), language.split(':')[0],
audio_language, audio_language,
"True" if language.endswith(':hi') else "False", "True" if language.endswith(':hi') else "False",
"True" if language.endswith(':forced') else "False", "True" if language.endswith(':forced') else "False",
@ -825,7 +825,7 @@ def episode_download_subtitles(no):
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace(episode['path']), result = download_subtitle(path_mappings.path_replace(episode['path']),
str(alpha3_from_alpha2(language.split(':')[0])), language.split(':')[0],
audio_language, audio_language,
"True" if language.endswith(':hi') else "False", "True" if language.endswith(':hi') else "False",
"True" if language.endswith(':forced') else "False", "True" if language.endswith(':forced') else "False",
@ -885,7 +885,7 @@ def movies_download_subtitles(no):
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace_movie(movie['path']), result = download_subtitle(path_mappings.path_replace_movie(movie['path']),
str(alpha3_from_alpha2(language.split(':')[0])), language.split(':')[0],
audio_language, audio_language,
"True" if language.endswith(':hi') else "False", "True" if language.endswith(':hi') else "False",
"True" if language.endswith(':forced') else "False", "True" if language.endswith(':forced') else "False",
@ -955,7 +955,7 @@ def wanted_download_subtitles(path, l, count_episodes):
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace(episode['path']), result = download_subtitle(path_mappings.path_replace(episode['path']),
str(alpha3_from_alpha2(language.split(':')[0])), language.split(':')[0],
audio_language, audio_language,
"True" if language.endswith(':hi') else "False", "True" if language.endswith(':hi') else "False",
"True" if language.endswith(':forced') else "False", "True" if language.endswith(':forced') else "False",
@ -1023,7 +1023,7 @@ def wanted_download_subtitles_movie(path, l, count_movies):
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace_movie(movie['path']), result = download_subtitle(path_mappings.path_replace_movie(movie['path']),
str(alpha3_from_alpha2(language.split(':')[0])), language.split(':')[0],
audio_language, audio_language,
"True" if language.endswith(':hi') else "False", "True" if language.endswith(':hi') else "False",
"True" if language.endswith(':forced') else "False", "True" if language.endswith(':forced') else "False",
@ -1320,7 +1320,7 @@ def upgrade_subtitles():
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace(episode['video_path']), result = download_subtitle(path_mappings.path_replace(episode['video_path']),
str(alpha3_from_alpha2(language)), language,
audio_language, audio_language,
is_hi, is_hi,
is_forced, is_forced,
@ -1379,7 +1379,7 @@ def upgrade_subtitles():
audio_language = 'None' audio_language = 'None'
result = download_subtitle(path_mappings.path_replace_movie(movie['video_path']), result = download_subtitle(path_mappings.path_replace_movie(movie['video_path']),
str(alpha3_from_alpha2(language)), language,
audio_language, audio_language,
is_hi, is_hi,
is_forced, is_forced,