From 390337946b22c7f6504249edc7eaf22cc3f9b52e Mon Sep 17 00:00:00 2001 From: Olivier Bado-Faustin <12731381+Badatos@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:27:58 +0100 Subject: [PATCH] Correct default thumbnail size to avoid thumbnail quality downgrade --- pod/settings.py | 2 +- pod/video/models.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pod/settings.py b/pod/settings.py index e32cb9a1c5..b00db303c8 100644 --- a/pod/settings.py +++ b/pod/settings.py @@ -13,7 +13,7 @@ ## # Version of the project # -VERSION = "3.8.2" +VERSION = "3.8.3" ## # Installed applications list diff --git a/pod/video/models.py b/pod/video/models.py index 7dd4f3fcab..e7164ed774 100644 --- a/pod/video/models.py +++ b/pod/video/models.py @@ -1001,12 +1001,12 @@ def get_player_height(self) -> int: """ return 360 if self.is_video else 244 - def get_thumbnail_url(self) -> str: - """Get a thumbnail url for the video.""" + def get_thumbnail_url(self, size="x720") -> str: + """Get a thumbnail url for the video, with defined max size.""" request = None if self.thumbnail and self.thumbnail.file_exist(): # Do not serve thumbnail url directly, as it can lead to the video URL - im = get_thumbnail(self.thumbnail.file, "x170", crop="center", quality=80) + im = get_thumbnail(self.thumbnail.file, size, crop="center", quality=80) return im.url else: return "".join(