From 2e5b0b49025914122ce06f219bd21baca9383900 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Mon, 9 Sep 2019 13:16:18 -0400 Subject: [PATCH] Fix for audio language profiles. --- bazarr/get_series.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr/get_series.py b/bazarr/get_series.py index e69f09137..df2831fa7 100644 --- a/bazarr/get_series.py +++ b/bazarr/get_series.py @@ -87,12 +87,14 @@ def update_series(): if serie_default_enabled is True: series_to_add.append((show["title"], show["path"], show["tvdbId"], serie_default_language, serie_default_hi, show["id"], overview, poster, fanart, - profile_id_to_language(show['qualityProfileId'], audio_profiles), show['sortTitle'], + profile_id_to_language( + (show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles), show['sortTitle'], show['year'], alternateTitles, serie_default_forced)) else: series_to_add.append((show["title"], show["path"], show["tvdbId"], show["tvdbId"], show["tvdbId"], show["id"], overview, poster, fanart, - profile_id_to_language(show['qualityProfileId'], audio_profiles), show['sortTitle'], + profile_id_to_language( + (show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles), show['sortTitle'], show['year'], alternateTitles, show["id"])) # Update or insert series in DB