From bc5a29d3ed095f3da70bae1a0f700681eb6ded55 Mon Sep 17 00:00:00 2001 From: greko17 Date: Tue, 24 Sep 2019 15:22:21 +0200 Subject: [PATCH] fix: specials/news.py per contentLanguage che sono liste --- specials/news.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/specials/news.py b/specials/news.py index bf42578d..faf11607 100644 --- a/specials/news.py +++ b/specials/news.py @@ -417,8 +417,13 @@ def get_title(item): title = re.compile("\[/*I\]", re.DOTALL).sub("", title) title = '[B]'+title+'[/B]' - if (type(item.contentLanguage) != list and 'ITA' not in item.contentLanguage) or item.contentLanguage != 'ITA': - title += support.typo(item.contentLanguage, '_ [] color kod') + if type(item.contentLanguage) == list and len(item.contentLanguage) ==1: + if 'ITA' not in item.contentLanguage: + title += support.typo(item.contentLanguage[0], '_ [] color kod') + elif type(item.contentLanguage) != list and item.contentLanguage != 'ITA': + title += support.typo(item.contentLanguage, '_ [] color kod') + else: + title += item.contentLanguage if item.quality: title += support.typo(item.quality, '_ [] color kod') return title