Fix display of progress in long play

This commit is contained in:
2023-03-08 13:30:05 -05:00
parent 6ffc77a9d5
commit 323e9ec8bf
2 changed files with 5 additions and 4 deletions

View File

@ -27,6 +27,7 @@
</div>
<div class="row">
<p>{{object.scrobble_set.count}} scrobbles</p>
<p>{{object.scrobble_set.last.book_pages_read}} page read to {% if object.scrobble_set.last.long_play_complete %} and completed{% else %}{% endif %}</p>
<p>
{% if object.scrobble_set.last.long_play_complete == True %}
<a href="">Read again</a>
@ -44,7 +45,7 @@
<tr>
<th scope="col">Date</th>
<th scope="col">Completed</th>
<th scope="col">Duration</th>
<th scope="col">Page read to</th>
<th scope="col">Authors</th>
</tr>
</thead>
@ -53,7 +54,7 @@
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{% if scrobble.long_play_complete == True %}Yes{% endif %}</td>
<td>{% if scrobble.in_progress %}Now playing{% else %}{{scrobble.long_play_session_seconds|natural_duration}}{% endif %}</td>
<td>{% if scrobble.in_progress %}Now reading{% else %}{{scrobble.book_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>
</tr>
{% endfor %}

View File

@ -27,7 +27,7 @@
</div>
<div class="row">
<p>{{object.scrobble_set.count}} scrobbles</p>
<p>{{object.scrobble_set.last.playback_position|natural_duration}}{% if object.scrobble_set.last.long_play_complete %} and completed{% else %} spent playing{% endif %}</p>
<p>{{object.scrobble_set.last.long_play_seconds|natural_duration}}{% if object.scrobble_set.last.long_play_complete %} and completed{% else %} spent playing{% endif %}</p>
<p>
{% if object.scrobble_set.last.long_play_complete == True %}
<a href="">Play again</a>
@ -54,7 +54,7 @@
<tr>
<td>{{scrobble.timestamp}}</td>
<td>{% if scrobble.long_play_complete == True %}Yes{% endif %}</td>
<td>{% if scrobble.in_progress %}Now playing{% else %}{{scrobble.long_play_session_seconds|natural_duration}}{% endif %}</td>
<td>{% if scrobble.in_progress %}Now playing{% else %}{{scrobble.playback_position|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>
</tr>
{% endfor %}