sessions / c2138b3ac642856816d8967ac1da45dac304be71

/home/powellc/src/code.unbl.ink/secstate/vrobbler

This commit has no recorded session.

diff

ignore whitespace

commit c2138b3ac642856816d8967ac1da45dac304be71Author: Colin Powell <colin@unbl.ink>Date:   Mon Jun 15 14:15:34 2026 -0400    [longplay] Add finish long play buttondiff --git a/PROJECT.org b/PROJECT.orgindex c7ea815..a229ca2 100644--- a/PROJECT.org+++ b/PROJECT.org@@ -88,7 +88,7 @@ fetching and simple saving. *** Metadata sources **** Scraper -* Backlog [4/24] :vrobbler:project:personal:+* Backlog [5/25] :vrobbler:project:personal: ** TODO [#C] Create small utility to clean up tracks scrobbled with wonky playback times :bug:music:scrobbles: :PROPERTIES: :ID:       702462cf-d54b-48c6-8a7c-78b8de751deb@@ -594,7 +594,10 @@ named constants for maintainability.   - ~vrobbler/apps/webpages/models.py~ (line 290) -- ="url"=   - ~vrobbler/apps/scrobbles/importers/tsv.py~ (line 55) -- ="S"= completion status -** TODO [#B] Allow marking media as long play complete from detail page :templates:scrobbles:longplay:+** DONE [#B] Allow marking media as long play complete from detail page :templates:scrobbles:longplay:+:PROPERTIES:+:ID:       2c314768-be97-9b10-d13c-9cfd0f38a64e+:END: ** DONE [#A] Fix how long play scrobbles are tracked :scrobbles:longplay:serial: :PROPERTIES: :ID:       908b0493-cabf-40c1-825f-cd59a8ad0f7adiff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.pyindex 464a3f3..71c28d0 100644--- a/vrobbler/apps/scrobbles/views.py+++ b/vrobbler/apps/scrobbles/views.py@@ -928,6 +928,12 @@ def scrobble_longplay_finish(request, uuid):             messages.SUCCESS,             f"Long play of {media_obj} finished.",         )+    elif last_scrobble and last_scrobble.long_play_complete == True:+        messages.add_message(+            request,+            messages.INFO,+            f"Long play of {media_obj} was already completed.",+        )     else:         messages.add_message(             request, messages.ERROR, f"Media with uuid {uuid} not found."diff --git a/vrobbler/templates/_longplay_scrobblable_list.html b/vrobbler/templates/_longplay_scrobblable_list.htmlindex b5cdf7b..2589376 100644--- a/vrobbler/templates/_longplay_scrobblable_list.html+++ b/vrobbler/templates/_longplay_scrobblable_list.html@@ -9,6 +9,7 @@             <th scope="col">Scrobbles</th>             <th scope="col">Complete</th>             <th scope="col">Start</th>+            <th scope="col">Finish</th>         </tr>     </thead>     <tbody>@@ -21,6 +22,7 @@             <td>{{obj.scrobble_count}}</td>             <td>{% if obj.scrobble_set.last.long_play_complete == True %}Yes{% endif %}</td>             <td><a type="button" class="btn btn-sm btn-primary" href="{{obj.start_url}}">Scrobble</a></td>+            <td><a type="button" class="btn btn-sm btn-warning" href="{{obj.get_longplay_finish_url}}">Finish</a></td>             {% endif %}         </tr>         {% endif %}diff --git a/vrobbler/templates/books/book_detail.html b/vrobbler/templates/books/book_detail.htmlindex 101ce14..560da9c 100644--- a/vrobbler/templates/books/book_detail.html+++ b/vrobbler/templates/books/book_detail.html@@ -36,6 +36,7 @@     <p>{{scrobbles.count}} scrobbles</p>      <p><a href="{{object.resume_start_url}}">Resume reading</a></p>+    <p><a class="btn btn-sm btn-warning" href="{{object.get_longplay_finish_url}}">Finish long play</a></p> </div> {% if charts %} <div class="row">diff --git a/vrobbler/templates/bricksets/brickset_detail.html b/vrobbler/templates/bricksets/brickset_detail.htmlindex 592ea90..6c3f203 100644--- a/vrobbler/templates/bricksets/brickset_detail.html+++ b/vrobbler/templates/bricksets/brickset_detail.html@@ -27,6 +27,7 @@ </div> <div class="row">     <p>{{scrobbles.count}} scrobbles</p>+    <p><a class="btn btn-sm btn-warning" href="{{object.get_longplay_finish_url}}">Finish long play</a></p> </div> <div class="row">     <div class="col-md">diff --git a/vrobbler/templates/tasks/task_detail.html b/vrobbler/templates/tasks/task_detail.htmlindex 05dd1ea..8ea1c4f 100644--- a/vrobbler/templates/tasks/task_detail.html+++ b/vrobbler/templates/tasks/task_detail.html@@ -53,6 +53,7 @@     <p>{{scrobbles.count}} scrobbles</p>     <p>         <a href="{{object.start_url}}">Play again</a>+        <a class="btn btn-sm btn-warning" href="{{object.get_longplay_finish_url}}">Finish long play</a>     </p> </div> <div class="row">diff --git a/vrobbler/templates/videogames/videogame_detail.html b/vrobbler/templates/videogames/videogame_detail.htmlindex 182cbee..6e7e4f3 100644--- a/vrobbler/templates/videogames/videogame_detail.html+++ b/vrobbler/templates/videogames/videogame_detail.html@@ -62,6 +62,7 @@     <p>{{scrobbles.count}} scrobbles</p>     <p>         <a href="">Play again</a>+        <a class="btn btn-sm btn-warning" href="{{object.get_longplay_finish_url}}">Finish long play</a>     </p> </div> <div class="row">