From 35ee6fb6f61dd79b8289b70bef6054708e499b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 10 Sep 2020 09:43:50 -0400 Subject: [PATCH] Fix for episode audio_language under Sonarr v2. --- bazarr/get_episodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bazarr/get_episodes.py b/bazarr/get_episodes.py index 8e8bee97c..c43d238a8 100644 --- a/bazarr/get_episodes.py +++ b/bazarr/get_episodes.py @@ -91,6 +91,10 @@ def sync_episodes(): if isinstance(item, dict): if 'name' in item: audio_language = item['name'] + else: + audio_language = database.execute("SELECT audio_language FROM table_shows WHERE " + "sonarrSeriesId=?", (episode['seriesId'],), + only_one=True)['audio_language'] # Add episodes in sonarr to current episode list current_episodes_sonarr.append(episode['id'])