From 859bc90662561035eb3127223a1e1361c6d32897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 9 Sep 2019 13:14:27 -0400 Subject: [PATCH] Fix for audio language profiles. --- bazarr/get_series.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/get_series.py b/bazarr/get_series.py index 01091f491..fd692d578 100644 --- a/bazarr/get_series.py +++ b/bazarr/get_series.py @@ -100,7 +100,7 @@ def update_series(): 'overview': overview, 'poster': poster, 'fanart': fanart, - 'audio_language': profile_id_to_language(show['qualityProfileId'], audio_profiles), + 'audio_language': profile_id_to_language((show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles), 'sort_title': show['sortTitle'], 'year': show['year'], 'alternate_titles': alternateTitles, @@ -113,7 +113,7 @@ def update_series(): 'overview': overview, 'poster': poster, 'fanart': fanart, - 'audio_language': profile_id_to_language(show['qualityProfileId'], audio_profiles), + 'audio_language': profile_id_to_language((show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles), 'sort_title': show['sortTitle'], 'year': show['year'], 'alternate_title': alternateTitles})