mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-24 23:07:36 +08:00
Fixed integer conversion issue. #1918
This commit is contained in:
parent
4382a05da1
commit
b0abe81d12
1 changed files with 8 additions and 3 deletions
|
@ -436,9 +436,14 @@ def get_desired_languages(profile_id):
|
|||
if profile_id and profile_id != 'null':
|
||||
for profile in profile_id_list:
|
||||
profileId, name, cutoff, items, mustContain, mustNotContain, originalFormat = profile.values()
|
||||
if profileId == int(profile_id):
|
||||
languages = [x['language'] for x in items]
|
||||
break
|
||||
try:
|
||||
profile_id_int = int(profile_id)
|
||||
except ValueError:
|
||||
continue
|
||||
else:
|
||||
if profileId == profile_id_int:
|
||||
languages = [x['language'] for x in items]
|
||||
break
|
||||
|
||||
return languages
|
||||
|
||||
|
|
Loading…
Reference in a new issue