avoid recomputing timeline for each part

This commit is contained in:
j 2016-09-15 15:12:47 +00:00
parent 285877054e
commit 750633eb7e

View file

@ -160,11 +160,13 @@ def extract_stream(fileId):
if stream.available:
stream.make_timeline()
stream.extract_derivatives()
file.extract_tracks()
# get current version from db
file = models.File.objects.get(id=fileId)
file.item.update_timeline()
update_poster(file.item.public_id)
file.extract_tracks()
if not file.item.rendered \
and not file.item.files.exclude(id=fileId).filter(Q(queued=True) | Q(encoding=True)).count():
file.item.update_timeline()
update_poster(file.item.public_id)
models.File.objects.filter(id=fileId).update(encoding=False)
Task.finish(file.item)