]> git.parisson.com Git - teleforma.git/commitdiff
avoid thumbnails, use full poster urls
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 5 Aug 2026 15:55:22 +0000 (17:55 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 5 Aug 2026 15:55:22 +0000 (17:55 +0200)
teleforma/models/core.py
teleforma/templates/teleforma/course_media.html
teleforma/templates/teleforma/courses.html
teleforma/templates/teleforma/inc/media_list.html

index 4cb98a0070aa09b05526792bd608c6255ec03e65..43fecb7afb66eed5d16526067340fc7a618511f4 100644 (file)
@@ -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):
index 3ac0723770d33a16eb5ee3fd1bfb8e13ea2e7b30..b45704373a96ff40a0d7dad0c1f3965774f0a52b 100644 (file)
@@ -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 %}
         >
             <source src="{% url 'teleforma-media-stream' period.id media.id %}" type="{{ media.mime_type }}" />
@@ -119,11 +116,7 @@ $(document).ready(function(){
 
 <div style="margin-top:1em;">
 {% if media.poster_file %}
-
-   {% thumbnail media.poster_url "300" as im %}
-    <img src="{{ im.url }}" width="300px" alt="preview" />
-   {% endthumbnail %}
-
+    <img src="{{ media.poster_url }}" width="300px" alt="preview" />
 {% else %}
  snapshot
 {% endif %}
index c6c7993be6def4e28e62e48b16beb91240e598dd..ecab1bc0779d1ad824adb3305d49fbd2ed92dc5f 100644 (file)
   </div>
   {% endif %}
 
-  {% if user.is_staff %}
-  <div class="module_action">
-    <a href="{% url 'teleforma-desk-period-pending' period.id %}" class="component_icon button"
-      id="action_red">{% trans "Pending" %}</a>
-  </div>
-  {% endif %}
-
   {% endblock module-action %}
 
   {% block notes %}
     <div class="video" style="width:400px">
       <a href="{% url 'teleforma-media-detail' period.id home_video.id %}" title="{% trans "Play" %}">
         {% if home_video.poster_file %}
-        {% thumbnail home_video.poster_file "168x96" as im %}
-        <div style="background: no-repeat url('{{ im.url }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
+        <div style="background: no-repeat url('{{ home_video.poster_url }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
           <img src="/static/teleforma/images/play_168.png" width="100%" alt="{% trans 'Click here' %}" />
         </div>
-        {% endthumbnail %}
         {% else %}
         {% trans 'Click here' %}
         {% endif %}
index d72596f49c7fa2d3c4e79251f3ce2b2abab3dc87..a5790d127a369b5e4847c1bc3bb667f2c87a8f50 100644 (file)
@@ -1,5 +1,4 @@
 {% load teleforma_tags %}
-{% load thumbnail %}
 {% load i18n %}
 
 {% course_past_conferences as all_conferences %}
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
             <a href="{% url 'teleforma-media-detail' period.id conference.video.id %}" title="{% trans "Play" %}">
             {% if conference.video.poster_file %}
-               {% thumbnail conference.video.poster_url "168x96" as im %}
-                <div style="background: no-repeat url('{{ im.url }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
+                <div style="background: no-repeat url('{{ conference.video.poster_url }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
                  <img src="/static/teleforma/images/play_168.png" width="100%" alt="{% trans 'Click here' %}" />
                 </div>
-               {% endthumbnail %}
             {% else %}
               <div>{% trans 'Click here' %}</div>
             {% endif %}