Fix for downloading both forced and not forced when clicking on manual download link while having "Both" requested.

pull/511/head
Louis Vézina 5 years ago
parent 33954f2459
commit 6a7af0aabd

@ -220,8 +220,10 @@
for missing_subs_language in missing_subs_languages: for missing_subs_language in missing_subs_languages:
if len(missing_subs_language) > 2: if len(missing_subs_language) > 2:
forced = missing_subs_language[2] forced = missing_subs_language[2]
forced_bool = True
else: else:
forced = False forced = False
forced_bool = False
end end
if details[14] is not None and settings.general.getboolean('adaptive_searching') and missing_subs_language in details[14]: if details[14] is not None and settings.general.getboolean('adaptive_searching') and missing_subs_language in details[14]:
@ -229,12 +231,12 @@
if missing_subs_language in lang: if missing_subs_language in lang:
if search_active(lang[1]): if search_active(lang[1]):
%> %>
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language.split(':')[0]))}}" data-hi="{{details[4]}}" data-forced="{{details[15]}}" data-radarrId={{details[10]}}> <a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language.split(':')[0]))}}" data-hi="{{details[4]}}" data-forced="{{forced_bool}}" data-radarrId={{details[10]}}>
{{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}} {{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}}
<i style="margin-left:3px; margin-right:0" class="search icon"></i> <i style="margin-left:3px; margin-right:0" class="search icon"></i>
</a> </a>
%else: %else:
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top left" data-inverted="" class="get_subtitle ui small red label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language.split(':')[0]))}}" data-hi="{{details[4]}}" data-forced="{{details[15]}}" data-radarrId={{details[10]}}> <a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top left" data-inverted="" class="get_subtitle ui small red label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language.split(':')[0]))}}" data-hi="{{details[4]}}" data-forced="{{forced_bool}}" data-radarrId={{details[10]}}>
{{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}} {{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}}
<i style="margin-left:3px; margin-right:0" class="search icon"></i> <i style="margin-left:3px; margin-right:0" class="search icon"></i>
</a> </a>
@ -244,7 +246,7 @@
end end
else: else:
%> %>
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language.split(':')[0]))}}" data-hi="{{details[4]}}" data-forced="{{details[15]}}" data-radarrId={{details[10]}}> <a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language.split(':')[0]))}}" data-hi="{{details[4]}}" data-forced="{{forced_bool}}" data-radarrId={{details[10]}}>
{{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}} {{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}}
<i style="margin-left:3px; margin-right:0" class="search icon"></i> <i style="margin-left:3px; margin-right:0" class="search icon"></i>
</a> </a>

Loading…
Cancel
Save