From 43c8ad7b27b4611215292b5793009383ea77b969 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 18 Aug 2011 22:35:43 +0200 Subject: [PATCH] actually extract derivatives --- pandora/archive/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 77a08d926..047f43213 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -494,12 +494,12 @@ class Stream(models.Model): for f in settings.VIDEO_FORMATS: derivative, created = Stream.objects.get_or_create(file=self.file, resolution=resolution, format=f) - if created: - derivative.source = self - name = derivative.name() - derivative.video.name = os.path.join(os.path.dirname(self.video.name), name) - derivative.encode() - derivative.save() + if created: + derivative.source = self + name = derivative.name() + derivative.video.name = os.path.join(os.path.dirname(self.video.name), name) + derivative.encode() + derivative.save() return True def encode(self):