Skip to content

Commit

Permalink
vimeo poster
Browse files Browse the repository at this point in the history
  • Loading branch information
benzkji committed Dec 8, 2023
1 parent f16627d commit a25e36a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion djangocms_baseplugins/video/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ def video_preview_image(self):
# return 'https://i.ytimg.com/vi/%s/0.jpg' % yt_id
# return 'https://img.youtube.com/vi/%s/maxresdefault.jpg' % yt_id
return 'https://img.youtube.com/vi/%s/0.jpg' % id
if self.video_type == 'youtube':
if self.video_type == 'vimeo':
id = self.video_id
return 'https://vumbnail.com/%s.jpg' % id
return ''


class VideoBase(VideoModelMixin, AbstractBasePlugin):
video_url = models.URLField(
null=True,
Expand Down

0 comments on commit a25e36a

Please sign in to comment.