padma settings

This commit is contained in:
j 2011-08-11 16:15:56 +02:00
parent f5a3a72b90
commit b5a6285330
2 changed files with 11 additions and 2 deletions

View file

@ -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']

View file

@ -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}}",