avoid division by zero, fixes #3169
This commit is contained in:
parent
4a45ae0016
commit
a1909c95b9
1 changed files with 3 additions and 2 deletions
|
@ -622,6 +622,7 @@ class Item(models.Model):
|
||||||
i['connections'] = self.expand_connections()
|
i['connections'] = self.expand_connections()
|
||||||
|
|
||||||
if not keys or 'posterRatio' in keys:
|
if not keys or 'posterRatio' in keys:
|
||||||
|
if self.poster_height:
|
||||||
i['posterRatio'] = self.poster_width / self.poster_height
|
i['posterRatio'] = self.poster_width / self.poster_height
|
||||||
|
|
||||||
streams = self.streams()
|
streams = self.streams()
|
||||||
|
@ -1479,7 +1480,7 @@ class Item(models.Model):
|
||||||
timeline = audio_timeline
|
timeline = audio_timeline
|
||||||
|
|
||||||
cmd = [settings.ITEM_POSTER, '-d', '-', '-p', poster]
|
cmd = [settings.ITEM_POSTER, '-d', '-', '-p', poster]
|
||||||
data = self.cache.copy()
|
data = self.json()
|
||||||
if frame:
|
if frame:
|
||||||
data['frame'] = frame
|
data['frame'] = frame
|
||||||
if os.path.exists(timeline):
|
if os.path.exists(timeline):
|
||||||
|
|
Loading…
Reference in a new issue