Few quick fixes

This commit is contained in:
2023-03-13 18:48:06 -04:00
parent 5fcc314fd0
commit 6fb6093fe1
2 changed files with 3 additions and 1 deletions

View File

@ -131,7 +131,7 @@ def get_long_plays_in_progress(user: User) -> dict:
now = now_user_timezone(user.profile)
for app, model in LONG_PLAY_MEDIA.items():
media_obj = apps.get_model(app_label=app, model_name=model)
for media in media_obj.objects.all().order_by("-scrobble__timestamp"):
for media in media_obj.objects.all():
last_scrobble = media.scrobble_set.filter(user=user).last()
if last_scrobble and last_scrobble.long_play_complete == False:
days_past = (now - last_scrobble.timestamp).days

View File

@ -16,6 +16,7 @@
{% if view == 'grid' %}
{% for period, medias in in_progress.items %}
{% if medias %}
<h2>{% if period == "active" %}Recently played{% else %}More than a week ago{% endif %}</h2>
<div class="col-md">
{% for media in medias %}
@ -33,6 +34,7 @@
</dl>
{% endfor %}
</div>
{% endif %}
{% endfor %}
{% else %}
<div class="col-md">