From 38395eeed9fb5e76d35410639a67a09cc22941cf Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 8 Sep 2010 16:42:07 +0200 Subject: [PATCH] extract strips too --- pandora/archive/extract.py | 2 +- pandora/backend/models.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 6117cc9..859fb9e 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -302,7 +302,7 @@ def divide(num, by): arr.append(div + (i > by - 1 - mod)) return arr -def strip_timeline(movie, cuts, info, prefix): +def timeline_strip(movie, cuts, info, prefix): _debug = False duration = info['duration'] video_height = info['video'][0]['height'] diff --git a/pandora/backend/models.py b/pandora/backend/models.py index b6d8fd3..2f136e9 100644 --- a/pandora/backend/models.py +++ b/pandora/backend/models.py @@ -441,6 +441,9 @@ class Movie(models.Model): stream.save() extract.timeline(stream.video.path, self.timeline_prefix) + + extract.timeline_strip(self, self.metadata['cuts'], stream.info, self.timeline_prefix[:-8]) + stream.extract_derivatives() self.metadata['cuts'] = extract.cuts(self.timeline_prefix) self.metadata['average_color'] = extract.average_color(self.timeline_prefix)