summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bazarr/sonarr/sync/parser.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bazarr/sonarr/sync/parser.py b/bazarr/sonarr/sync/parser.py
index 216a9d1f5..b985236fb 100644
--- a/bazarr/sonarr/sync/parser.py
+++ b/bazarr/sonarr/sync/parser.py
@@ -35,9 +35,11 @@ def seriesParser(show, action, tags_dict, language_profiles, serie_default_profi
if image['coverType'] == 'fanart':
fanart = image['url'].split('?')[0]
- alternate_titles = None
if show['alternateTitles'] is not None:
- alternate_titles = str([item['title'] for item in show['alternateTitles']])
+ alternate_titles = [item['title'] for item in show['alternateTitles'] if 'title' in item and item['title'] not
+ in [None, ''] and item["title"] != show["title"]]
+ else:
+ alternate_titles = []
tags = [d['label'] for d in tags_dict if d['id'] in show['tags']]
@@ -64,7 +66,7 @@ def seriesParser(show, action, tags_dict, language_profiles, serie_default_profi
'audio_language': str(audio_language),
'sortTitle': show['sortTitle'],
'year': str(show['year']),
- 'alternativeTitles': alternate_titles,
+ 'alternativeTitles': str(alternate_titles),
'tags': str(tags),
'seriesType': show['seriesType'],
'imdbId': imdbId,