[longplay] Add finish long play button
All checks were successful
build / test (push) Successful in 1m53s
All checks were successful
build / test (push) Successful in 1m53s
This commit is contained in:
@ -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-cd59a8ad0f7a
|
||||
|
||||
@ -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."
|
||||
|
||||
@ -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 %}
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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">
|
||||
|
||||
Reference in New Issue
Block a user