more things depend on gif.
This commit is contained in:
parent
1e408d9b25
commit
c1063b4ff8
1 changed files with 21 additions and 20 deletions
|
@ -200,7 +200,8 @@ class Content(models.Model):
|
||||||
if self.photo and self.photo.image.url.endswith('.gif'):
|
if self.photo and self.photo.image.url.endswith('.gif'):
|
||||||
video_path = self.photo.image.path.replace('.gif', '.mp4')
|
video_path = self.photo.image.path.replace('.gif', '.mp4')
|
||||||
image_path = self.photo.image.path.replace('.gif', '.jpg')
|
image_path = self.photo.image.path.replace('.gif', '.jpg')
|
||||||
if os.path.exists(self.photo.image.path) and not os.path.exists(video_path):
|
if os.path.exists(self.photo.image.path):
|
||||||
|
if not os.path.exists(video_path):
|
||||||
height = self.photo.image.height
|
height = self.photo.image.height
|
||||||
if height % 2:
|
if height % 2:
|
||||||
height += 1
|
height += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue