[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:
@ -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