From 98c479cfb9fe6f027ec545d7c905b719a40f1393 Mon Sep 17 00:00:00 2001 From: Captsha Date: Mon, 2 Feb 2015 22:12:20 +0100 Subject: [PATCH] Improve code check for list comprehensions Related to : https://github.com/SiCKRAGETV/sickrage-issues/issues/457 This is why we have comma on the database like here ",en". Because alpha2 variable is empty. Also, they have an error on the display page, this is already PR https://github.com/SiCKRAGETV/SickRage/pull/1260 --- sickbeard/subtitles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sickbeard/subtitles.py b/sickbeard/subtitles.py index 70791212..dce61585 100644 --- a/sickbeard/subtitles.py +++ b/sickbeard/subtitles.py @@ -71,7 +71,7 @@ def subtitlesLanguages(video_path): subtitles = video.scan() languages = set() for subtitle in subtitles: - if subtitle.language: + if subtitle.language and subtitle.language.alpha2: languages.add(subtitle.language.alpha2) else: languages.add(SINGLE)