diff --git a/templates/macros.html b/templates/macros.html index 24fe84bdb5e3ea25b6f4147a7d8f6ad1a23b122f..f79b108bb09856e3235e43d7752a3104378efb40 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -3,7 +3,7 @@ <a href="{{url_for('lecture', course=lecture.course.handle, id=lecture['id'])}}" title="{{ lecture.course.title }}" style="color: #000"> <div class="hidden-xs"> <div class="row"> - <img class="col-xs-4" style="max-height: 120px; height: auto; width:170px" src="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; "> + <img class="col-xs-4" style="max-height: 120px; height: auto; width:170px" src="{{ config.VIDEOPREFIX }}/thumbnail/l_{{ lecture['id'] }}.jpg" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; "> <div class="col-xs-4"> <span>{% if lecture.live %}<span class="label label-danger">Live</span> {% endif %}<strong>{{ lecture.course.short }}</strong>{% if ismod() %} <i>({{lecture.course_id}})</i>{% endif %}</span><br> <span>{% if ismod() %}ID: {{lecture.id}}{% endif %}</span><br> @@ -21,7 +21,7 @@ <div class="visible-xs"> <ul class="list-unstyled"> <li> - <img style="width: 100%;" src="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; "> + <img style="width: 100%;" src="{{ config.VIDEOPREFIX }}/thumbnail/l_{{ lecture['id'] }}.jpg" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; "> </li> <li> {% if lecture.live %}<span class="label label-danger">Live</span> {% endif %} @@ -168,7 +168,7 @@ $('#embedcodebtn').popover( {% macro lecture_list_item(lecture,videos,global_permissions) %} <li class="list-group-item" id="lecture-{{lecture.id}}"> <div class="row"> - <div style="background-image: url('{% if not lecture.titlefile %}{{url_for('static',filename='no-thumbnail.png')}}{% else %}{{ config.VIDEOPREFIX }}/{{lecture.titlefile}}'){% endif %}" class="col-sm-2 col-xs-12 thumbnailimg"> + <div style="background-image: url('{% if not lecture.titlefile %}{{url_for('static',filename='no-thumbnail.png')}}{% else %}{{ config.VIDEOPREFIX }}/thumbnail/l_{{lecture.id}}.jpg'){% endif %}" class="col-sm-2 col-xs-12 thumbnailimg"> {% if not videos|length is equalto 0 %} <a href="{{url_for('lecture', course=lecture.course.handle, id=lecture.id)}}"> <span class="glyphicon glyphicon-play-circle playpreviewbtn"></span>