dont try to extract frames from audio
This commit is contained in:
parent
5413e8d8b7
commit
a56428620a
1 changed files with 11 additions and 10 deletions
|
@ -1394,16 +1394,17 @@ class Item(models.Model):
|
||||||
else:
|
else:
|
||||||
if 'videoRatio' in self.json and self.sort.duration:
|
if 'videoRatio' in self.json and self.sort.duration:
|
||||||
width, height = self.json['resolution']
|
width, height = self.json['resolution']
|
||||||
pos = self.sort.duration / 2
|
if width and height:
|
||||||
for p in map(int, [pos/2, pos, pos+pos/2]):
|
pos = self.sort.duration / 2
|
||||||
path = self.frame(p, height)
|
for p in map(int, [pos/2, pos, pos+pos/2]):
|
||||||
if path:
|
path = self.frame(p, height)
|
||||||
frames.append({
|
if path:
|
||||||
'position': p,
|
frames.append({
|
||||||
'path': path,
|
'position': p,
|
||||||
'width': width,
|
'path': path,
|
||||||
'height': height,
|
'width': width,
|
||||||
})
|
'height': height,
|
||||||
|
})
|
||||||
return frames
|
return frames
|
||||||
|
|
||||||
def select_frame(self):
|
def select_frame(self):
|
||||||
|
|
Loading…
Reference in a new issue