mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
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
This commit is contained in:
parent
c62d8f2c79
commit
98c479cfb9
@ -71,7 +71,7 @@ def subtitlesLanguages(video_path):
|
|||||||
subtitles = video.scan()
|
subtitles = video.scan()
|
||||||
languages = set()
|
languages = set()
|
||||||
for subtitle in subtitles:
|
for subtitle in subtitles:
|
||||||
if subtitle.language:
|
if subtitle.language and subtitle.language.alpha2:
|
||||||
languages.add(subtitle.language.alpha2)
|
languages.add(subtitle.language.alpha2)
|
||||||
else:
|
else:
|
||||||
languages.add(SINGLE)
|
languages.add(SINGLE)
|
||||||
|
Loading…
Reference in New Issue
Block a user