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})