forked from 0x2620/pandora
srt fix, only extract streams from video
This commit is contained in:
parent
93d2a77f3d
commit
f1ccb72542
2 changed files with 2 additions and 1 deletions
|
@ -195,6 +195,7 @@ class File(models.Model):
|
||||||
encoding = _detectEncoding(f)
|
encoding = _detectEncoding(f)
|
||||||
data = f.read()
|
data = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
data = data.replace('\r\n', '\n')
|
||||||
try:
|
try:
|
||||||
data = unicode(data, encoding)
|
data = unicode(data, encoding)
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -464,7 +464,7 @@ class Item(models.Model):
|
||||||
|
|
||||||
def updateStreams(self):
|
def updateStreams(self):
|
||||||
files = {}
|
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
|
files[utils.sort_title(f.name)] = f.video.path
|
||||||
|
|
||||||
#FIXME: how to detect if something changed?
|
#FIXME: how to detect if something changed?
|
||||||
|
|
Loading…
Reference in a new issue