From 243c1958c183493b0738ff30c8b5107c2fe65bdb Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 6 Feb 2015 10:57:14 +0530 Subject: [PATCH] dont import empty subtitles --- pandora/archive/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 8de99631..a3a89fa5 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -282,7 +282,7 @@ class File(models.Model): srt = [] subtitles = [] for s in ox.srt.load(self.data.path): - if s['in'] <= s['out']: + if s['in'] <= s['out'] and s['value'].strip(): key = '%s --> %s\n%s' % (s['in'], s['out'], s['value']) if key not in subtitles: subtitles.append(key)