Skip to content

Commit 3e34f08

Browse files
authored
Merge pull request EsupPortail#1228 from Badatos/bugfix_thumbnail-size
Correct default thumbnail size to avoid thumbnail quality downgrade
2 parents c1692ca + 3903379 commit 3e34f08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pod/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
##
1414
# Version of the project
1515
#
16-
VERSION = "3.8.2"
16+
VERSION = "3.8.3"
1717

1818
##
1919
# Installed applications list

pod/video/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,12 +1001,12 @@ def get_player_height(self) -> int:
10011001
"""
10021002
return 360 if self.is_video else 244
10031003

1004-
def get_thumbnail_url(self) -> str:
1005-
"""Get a thumbnail url for the video."""
1004+
def get_thumbnail_url(self, size="x720") -> str:
1005+
"""Get a thumbnail url for the video, with defined max size."""
10061006
request = None
10071007
if self.thumbnail and self.thumbnail.file_exist():
10081008
# Do not serve thumbnail url directly, as it can lead to the video URL
1009-
im = get_thumbnail(self.thumbnail.file, "x170", crop="center", quality=80)
1009+
im = get_thumbnail(self.thumbnail.file, size, crop="center", quality=80)
10101010
return im.url
10111011
else:
10121012
return "".join(

0 commit comments

Comments
 (0)