From: Guillaume Pellerin Date: Wed, 5 Aug 2026 15:55:22 +0000 (+0200) Subject: avoid thumbnails, use full poster urls X-Git-Tag: 3.1.0~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6dfbb2fea0614b3926e16a2d31e832afb9587298;p=teleforma.git avoid thumbnails, use full poster urls --- diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 4cb98a00..43fecb7a 100644 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -1136,9 +1136,6 @@ class Media(MediaBase): poster_file = self.get_poster_file() if poster_file: url = poster_file.url - if not "http" in url: - domain = Site.objects.get_current().domain - url = f'https://{domain}{url}' return url def get_file(self): diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html index 3ac07237..b4570437 100644 --- a/teleforma/templates/teleforma/course_media.html +++ b/teleforma/templates/teleforma/course_media.html @@ -1,7 +1,6 @@ {% extends "teleforma/course_detail.html" %} {% load teleforma_tags %} {% load i18n %} -{% load thumbnail %} {% block extra_javascript %} @@ -89,9 +88,7 @@ $(document).ready(function(){ height="auto" data-setup='{"playbackRates": [1, 1.25, 1.5, 2]}' {% if media.poster_url %} - {% thumbnail media.poster_url '640' as im %} - poster="{{ im.url }}" - {% endthumbnail %} + poster="{{ media.poster_url }}" {% endif %} > @@ -119,11 +116,7 @@ $(document).ready(function(){
{% if media.poster_file %} - - {% thumbnail media.poster_url "300" as im %} - preview - {% endthumbnail %} - + preview {% else %} snapshot {% endif %} diff --git a/teleforma/templates/teleforma/courses.html b/teleforma/templates/teleforma/courses.html index c6c7993b..ecab1bc0 100644 --- a/teleforma/templates/teleforma/courses.html +++ b/teleforma/templates/teleforma/courses.html @@ -36,13 +36,6 @@
{% endif %} - {% if user.is_staff %} -
- {% trans "Pending" %} -
- {% endif %} - {% endblock module-action %} {% block notes %} @@ -90,11 +83,9 @@
{% if home_video.poster_file %} - {% thumbnail home_video.poster_file "168x96" as im %} -
+
{% trans 'Click here' %}
- {% endthumbnail %} {% else %} {% trans 'Click here' %} {% endif %} diff --git a/teleforma/templates/teleforma/inc/media_list.html b/teleforma/templates/teleforma/inc/media_list.html index d72596f4..a5790d12 100644 --- a/teleforma/templates/teleforma/inc/media_list.html +++ b/teleforma/templates/teleforma/inc/media_list.html @@ -1,5 +1,4 @@ {% load teleforma_tags %} -{% load thumbnail %} {% load i18n %} {% course_past_conferences as all_conferences %} @@ -17,11 +16,9 @@
{% if conference.video.poster_file %} - {% thumbnail conference.video.poster_url "168x96" as im %} -
+
{% trans 'Click here' %}
- {% endthumbnail %} {% else %}
{% trans 'Click here' %}
{% endif %}