[templates] Fix album use and local_timestamp

This commit is contained in:
2025-07-25 10:21:20 -04:00
parent edf9fbd9c1
commit fd36034f6d
20 changed files with 26 additions and 26 deletions

View File

@ -297,7 +297,7 @@
<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 %}
{% if scrobble.logdata %}{% if scrobble.logdata.description %}<p><em>{{scrobble.logdata.description}}</em></p>{% endif %}{% endif %}
<p><small>{{scrobble.timestamp|naturaltime}} from {{scrobble.source}}</small></p>
<p><small>{{scrobble.local_timestamp|naturaltime}} from {{scrobble.source}}</small></p>
<div class="progress-bar" style="margin-right:5px;">
<span class="progress-bar-fill" style="width: {{scrobble.percent_played}}%;"></span>
</div>

View File

@ -57,7 +57,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -62,7 +62,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td>{{scrobble.media_obj.publisher}}</td>
<td>{% if scrobble.screenshot%}<img src="{{scrobble.screenshot.url}}" width=250 />{% endif %}</td>
</tr>

View File

@ -52,7 +52,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td>{% if scrobble.long_play_complete == True %}Yes{% endif %}</td>
<td>{% if scrobble.in_progress %}Now reading{% else %}{{scrobble.session_pages_read}}{% endif %}</td>
<td>{% for author in scrobble.book.authors.all %}<a href="{{author.get_absolute_url}}">{{author}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>

View File

@ -62,7 +62,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp|naturaltime}}</td>
<td>{{scrobble.local_timestamp|naturaltime}}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -28,7 +28,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -49,7 +49,7 @@
</tr>
</thead>
<tbody>
{% for track in object.tracks %}
{% for track in object.tracks.all %}
<tr>
<td>{{rank}}#1</td>
<td><a href="{{track.get_absolute_url}}">{{track.title}}</a></td>
@ -82,7 +82,7 @@
<tbody>
{% for scrobble in object.scrobbles %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td><a href="{{scrobble.track.get_absolute_url}}">{{scrobble.track.title}}</a></td>
<td><a href="{{scrobble.track.artist.get_absolute_url}}">{{scrobble.track.artist.name}}</a></td>
</tr>

View File

@ -54,7 +54,7 @@
<tr>
<td>#{{track.0}}</td>
<td><a href="{{track.1.get_absolute_url}}">{{track.1.title}}</a></td>
<td><a href="{{track.1.album.get_absolute_url}}">{{track.1.album}}</a></td>
<td><a href="{{track.1.primary_album.get_absolute_url}}">{{track.1.primary_album}}</a></td>
<td>{{track.1.scrobble_count}}</td>
<td>
<div class="progress-bar" style="margin-right:5px;">
@ -83,9 +83,9 @@
<tbody>
{% for scrobble in object.scrobbles %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td><a href="{{scrobble.track.get_absolute_url}}">{{scrobble.track.title}}</a></td>
<td><a href="{{scrobble.track.album.get_absolute_url}}">{{scrobble.track.album.name}}</a></td>
<td><a href="{{scrobble.track.primary_album.get_absolute_url}}">{{scrobble.track.primary_album.name}}</a></td>
</tr>
{% endfor %}
</tbody>

View File

@ -4,8 +4,8 @@
{% block lists %}
<div class="row">
{% if track.album.cover_image %}
<p style="width:150px; float:left;"><img src="{{track.album.cover_image.url}}" width=150 height=150 /></p>
{% if track.primary_image_url %}
<p style="width:150px; float:left;"><img src="{{track.primary_image_url}}" width=150 height=150 /></p>
{% endif %}
</div>
<div class="row">
@ -28,9 +28,9 @@
<tbody>
{% for scrobble in object.scrobble_set.all %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td><a href="{{scrobble.track.get_absolute_url}}">{{scrobble.track.title}}</a></td>
<td><a href="{{scrobble.track.album.get_absolute_url}}">{{scrobble.track.album}}</a></td>
<td><a href="{{scrobble.track.primary_album.get_absolute_url}}">{{scrobble.track.primary_album}}</a></td>
<td><a href="{{scrobble.track.artist.get_absolute_url}}">{{scrobble.track.artist}}</a></td>
</tr>
{% endfor %}

View File

@ -45,7 +45,7 @@
<tbody>
{% for scrobble in scrobbles.all %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td>{{scrobble.podcast_episode}}</td>
</tr>
{% endfor %}

View File

@ -1,7 +1,7 @@
{% load humanize %}
{% load naturalduration %}
<tr {% if scrobble.in_progress %}class="in-progress"{% endif %}>
<td>{% if scrobble.in_progress %}{{scrobble.media_obj.strings.verb}} now | <a class="right" href="{% url "scrobbles:finish" scrobble.uuid %}">Finish</a>{% else %}{{scrobble.timestamp|naturaltime}}{% endif %}</td>
<td>{% if scrobble.in_progress %}{{scrobble.media_obj.strings.verb}} now | <a class="right" href="{% url "scrobbles:finish" scrobble.uuid %}">Finish</a>{% else %}{{scrobble.local_timestamp|naturaltime}}{% endif %}</td>
<td>
{% if scrobble.media_type == "Task" %}
<p><em><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj.title|truncatechars_html:45}} - {% if scrobble.logdata %}{% if scrobble.logdata.description %}{{scrobble.logdata.description}}{% endif %}{% endif %}</a></em></p>

View File

@ -22,7 +22,7 @@
<tbody>
{% for scrobble in object.scrobbles %}
<tr>
<td><a href="{{scrobble.get_absolute_url}}">{{scrobble.timestamp}}</a></td>
<td><a href="{{scrobble.get_absolute_url}}">{{scrobble.local_timestamp}}</a></td>
<td>{{scrobble.media_type}}</td>
<td>{{scrobble.media_obj}}
</tr>

View File

@ -19,7 +19,7 @@
<tbody>
{% for scrobble in object_list %}
<tr>
<td>{{scrobble.timestamp|naturaltime}}</td>
<td>{{scrobble.local_timestamp|naturaltime}}</td>
<td><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj}}</a></td>
<td>{{scrobble.media_type}}</td>
</tr>

View File

@ -20,7 +20,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td>{{scrobble.media_obj.round.season.name}}</td>
<td>{{scrobble.media_obj.round.season.league}}</td>
</tr>

View File

@ -59,7 +59,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td><a href="{{scrobble.get_media_source_url}}">{{scrobble.logdata.description}}</a></td>
<td>{{scrobble.source}}</td>
<td>{{scrobble.log.notes}}</td>

View File

@ -57,7 +57,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -88,7 +88,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local-timestamp}}</td>
<td>{% if scrobble.long_play_complete == True %}Yes{% else %}Not yet{% endif %}</td>
<td>{% if scrobble.in_progress %}Now playing{% else %}{{scrobble.playback_position_seconds|natural_duration}}{% endif %}</td>
<td>{% for platform in scrobble.video_game.platforms.all %}<a href="{{platform.get_absolute_url}}">{{platform}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>

View File

@ -60,7 +60,7 @@
<tbody>
{% for scrobble in scrobbles %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
<td><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj.title}}</a></td>
<td>{{scrobble.media_obj.season_number}}</td>
<td>{{scrobble.media_obj.episode_number}}</td>

View File

@ -87,7 +87,7 @@ dd {
<tbody>
{% for scrobble in object.scrobble_set.all %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -53,7 +53,7 @@
<tbody>
{% for scrobble in object.scrobble_set.all %}
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{{scrobble.local_timestamp}}</td>
</tr>
{% endfor %}
</tbody>