forked from 0x2620/pandora
strip timeline
This commit is contained in:
parent
152d2f7cbe
commit
8947e51243
5 changed files with 85 additions and 12 deletions
|
|
@ -415,7 +415,7 @@ class Movie(models.Model):
|
|||
|
||||
@property
|
||||
def timeline_prefix(self):
|
||||
return os.path.join('stream', movieid_path(self.movieId), 'timeline')
|
||||
return os.path.join(settings.MEDIA_ROOT, 'stream', movieid_path(self.movieId), 'timeline')
|
||||
|
||||
def updateStreams(self):
|
||||
files = {}
|
||||
|
|
@ -440,9 +440,10 @@ class Movie(models.Model):
|
|||
subprocess.Popen(cmd)
|
||||
stream.save()
|
||||
|
||||
extract.timeline(stream.video.path, os.path.join(settings.MEDIA_ROOT, self.timeline_prefix))
|
||||
extract.timeline(stream.video.path, self.timeline_prefix)
|
||||
stream.extract_derivatives()
|
||||
|
||||
self.metadata['cuts'] = extract.cuts(self.timeline_prefix)
|
||||
self.metadata['average_color'] = extract.average_color(self.timeline_prefix)
|
||||
#something with poster
|
||||
self.available = True
|
||||
self.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue