From 9e38798f446a6f0b4a17f481034d63fb8eef5672 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 6 Jun 2023 11:55:45 -0400 Subject: [PATCH] Add board and video games to index --- vrobbler/apps/scrobbles/views.py | 8 +++ .../templates/scrobbles/scrobble_list.html | 67 +++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index 330277a..042901d 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -91,6 +91,14 @@ class RecentScrobbleList(ListView): sport_event__isnull=False ).order_by("-timestamp")[:15] + data["videogame_scrobble_list"] = completed_for_user.filter( + video_game__isnull=False + ).order_by("-timestamp")[:15] + + data["boardgame_scrobble_list"] = completed_for_user.filter( + board_game__isnull=False + ).order_by("-timestamp")[:15] + data["active_imports"] = AudioScrobblerTSVImport.objects.filter( processing_started__isnull=False, processed_finished__isnull=True, diff --git a/vrobbler/templates/scrobbles/scrobble_list.html b/vrobbler/templates/scrobbles/scrobble_list.html index 52ffcb7..b3925e2 100644 --- a/vrobbler/templates/scrobbles/scrobble_list.html +++ b/vrobbler/templates/scrobbles/scrobble_list.html @@ -451,6 +451,14 @@ + +
@@ -560,6 +568,65 @@
+ +
+

Latest Video Games

+
+ + + + + + + + + + + {% for scrobble in videogame_scrobble_list %} + + + {% if scrobble.videogame_screenshot %} + + {% else %} + + {% endif %} + + + + {% endfor %} + +
DateCoverTitleScore
{{scrobble.timestamp|naturaltime}}{{scrobble.media_obj.title}}{{scrobble.media_obj.hltb_score}}
+
+
+ + +
+

Latest Board Games

+
+ + + + + + + + + + + {% for scrobble in boardgame_scrobble_list %} + + + + + + + {% endfor %} + +
DateCoverTitleRating
{{scrobble.timestamp|naturaltime}}{{scrobble.media_obj.title}}{{scrobble.media_obj.rating}}
+
+
{% endif %}