Fix calculating pages read

This commit is contained in:
2023-03-08 13:44:05 -05:00
parent 76b1816452
commit 6c880b3030
2 changed files with 15 additions and 6 deletions

View File

@ -27,7 +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>Read {{object.scrobble_set.last.book_pages_read}} pages{% 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>
@ -45,7 +45,7 @@
<tr>
<th scope="col">Date</th>
<th scope="col">Completed</th>
<th scope="col">Page read to</th>
<th scope="col">Pages read</th>
<th scope="col">Authors</th>
</tr>
</thead>
@ -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 reading{% else %}{{scrobble.book_pages_read}}{% 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>
</tr>
{% endfor %}