From f1ccb72542596132604a421d12ae8a8a6160848a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 27 Sep 2010 10:55:37 +0200 Subject: [PATCH] srt fix, only extract streams from video --- pandora/archive/models.py | 1 + pandora/backend/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index abe142ed..5ba090f4 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -195,6 +195,7 @@ class File(models.Model): encoding = _detectEncoding(f) data = f.read() f.close() + data = data.replace('\r\n', '\n') try: data = unicode(data, encoding) except: diff --git a/pandora/backend/models.py b/pandora/backend/models.py index 1545be17..443594dc 100644 --- a/pandora/backend/models.py +++ b/pandora/backend/models.py @@ -464,7 +464,7 @@ class Item(models.Model): def updateStreams(self): files = {} - for f in self.files.filter(is_main=True, available=True): + for f in self.files.filter(is_main=True, is_video=True, available=True): files[utils.sort_title(f.name)] = f.video.path #FIXME: how to detect if something changed?