Another attempt to fix audio languages for Radarr v3.

pull/1096/head
Louis Vézina 4 years ago
parent d6ce71b16f
commit 5dbde75893

@ -151,8 +151,11 @@ def update_movies():
audio_language = profile_id_to_language(movie['qualityProfileId'], audio_profiles)
else:
if 'languages' in movie['movieFile'] and len(movie['movieFile']['languages']):
if 'name' in movie['movieFile']['languages'][0]:
audio_language = movie['movieFile']['languages'][0]['name']
for item in movie['movieFile']['languages']:
if isinstance(item, dict):
if 'name' in item:
audio_language = item['name']
break
tags = [d['label'] for d in tagsDict if d['id'] in movie['tags']]

Loading…
Cancel
Save