Let's also thumbnail the now playing widget

This commit is contained in:
2023-03-28 15:24:04 -04:00
parent c39430e987
commit 76cc1f7b1c
8 changed files with 36 additions and 29 deletions

View File

@ -1,5 +1,6 @@
{% load static %}
{% load humanize %}
{% load thumbnail %}
<!doctype html>
<html class="no-js" lang="">
<head>
@ -245,7 +246,11 @@
<b>Now playing</b>
{% for scrobble in now_playing_list %}
<div class="now-playing">
{% if scrobble.media_obj.primary_image_url %}<div style="float:left;padding-right:10px;padding-bottom:10px;"><img src="{{scrobble.media_obj.primary_image_url}}" /></div>{% endif %}
{% if scrobble.media_obj.primary_image %}
{% thumbnail scrobble.media_obj.primary_image 75x75 as im %}
<div style="float:left;padding-right:10px;padding-bottom:10px;"><img src="{{im.url}}" width={{im.width}} height={{im.height}} /></div>
{% endthumbnail %}
{% endif %}
<p><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj.title}}</a></p>
{% if scrobble.media_obj.subtitle %}<p><em><a href="{{scrobble.media_obj.subtitle.get_absolute_url}}">{{scrobble.media_obj.subtitle}}</a></em></p>{% endif %}
<p><small>{{scrobble.timestamp|naturaltime}} from {{scrobble.source}}</small></p>