Przeglądaj źródła

[books] Clean up resume URLs

Colin Powell 2 tygodni temu
rodzic
commit
723d739405

+ 4 - 1
vrobbler/apps/scrobbles/scrobblers.py

@@ -317,7 +317,10 @@ def manual_scrobble_book(
 
     if action == "stop":
         if url:
-            scrobble.log["resume_url"] = next_url_if_exists(url)
+            if isinstance(scrobble.log, "BookLogData"):
+                scrobble.log.resume_url = next_url_if_exists(url)
+            else:
+                scrobble.log["resume_url"] = next_url_if_exists(url)
             scrobble.save(update_fields=["log"])
         scrobble.stop(force_finish=True)
 

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

@@ -26,9 +26,8 @@
     </div>
 </div>
 <div class="row">
-    <p><a href="{{s.logdata.restart_url}}">Read again</a></p>
     {% if object.readcomics_url %}
-    <p><a href="{{object.readcomics_url}}">Read next issue</a></p>
+    <p><a href="{{object.readcomics_url}}">Read again</a></p>
     {% endif %}
     {% if object.next_readcomics_url %}
     <p><a href="{{object.next_readcomics_url}}">Read next issue</a></p>