From 9c256cf320b035376309ea375eafe7ecaac98424 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 11 Aug 2011 16:15:56 +0200 Subject: [PATCH] padma settings --- pandora/item/models.py | 9 +++++++-- pandora/padma.json | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 0e918ec..4eafa25 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -821,7 +821,7 @@ class Item(models.Model): os.symlink(files.values()[0], stream.video.path) stream.save() - extract.timeline(stream.video.path, self.timeline_prefix) + self.make_timeline() if 'video' in stream.info and stream.info['video']: v = stream.info['video'][0] self.stream_aspect = v['width']/v['height'] @@ -885,6 +885,11 @@ class Item(models.Model): return u.url return None + def make_timeline(self): + stream = self.streams.filter(profile=settings.VIDEO_PROFILE) + if stream.count() > 0 and stream[0].video: + extract.timeline(stream[0].video.path, self.timeline_prefix) + def make_poster(self, force=False): if not self.poster or force: url = self.prefered_poster_url() @@ -948,7 +953,7 @@ class Item(models.Model): return frames def get_poster_frame_path(self): - frames = self.poster_frames() + frames = self.poster_frames() if self.poster_frame >= 0: if frames and len(frames) > int(self.poster_frame): return frames[int(self.poster_frame)]['path'] diff --git a/pandora/padma.json b/pandora/padma.json index b7b56ad..2c689bb 100644 --- a/pandora/padma.json +++ b/pandora/padma.json @@ -347,6 +347,10 @@ {"id": "map", "title": "on Map"}, {"id": "calendar", "title": "on Calendar"} ], + "media": { + "importMoviePosters": false, + "importPosterFrames": false + }, "site": { "id": "{{settings.SITEID}}", "name": "{{settings.SITENAME}}",