Explorar o código

Fix display of progress in long play

Colin Powell %!s(int64=2) %!d(string=hai) anos
pai
achega
323e9ec8bf

+ 3 - 2
vrobbler/templates/books/book_detail.html

@@ -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 %}

+ 2 - 2
vrobbler/templates/videogames/videogame_detail.html

@@ -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 %}