From 2c5516ae4e33f9abb2342a5785c3ab7eeaacbdcd Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Thu, 23 May 2024 21:21:58 -0400 Subject: [PATCH] [scrobbles] Add life events to status page --- vrobbler/apps/scrobbles/views.py | 3 +++ vrobbler/templates/scrobbles/status.html | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index d682e17..9e54181 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -762,6 +762,9 @@ class ScrobbleStatusView(LoginRequiredMixin, TemplateView): data["browsing"] = progress_plays.filter( web_page__isnull=False ).first() + data["participating"] = progress_plays.filter( + life_event__isnull=False + ).first() long_plays = user_scrobble_qs.filter( long_play_complete=False, played_to_completion=True diff --git a/vrobbler/templates/scrobbles/status.html b/vrobbler/templates/scrobbles/status.html index f9205e6..350b3d0 100644 --- a/vrobbler/templates/scrobbles/status.html +++ b/vrobbler/templates/scrobbles/status.html @@ -132,5 +132,19 @@ {% endif %} +

Participating

+
+ {% if participating %} +
+

{{participating.media_obj}}

+ {% if participating.media_obj.subtitle %}

{{participaing.media_obj.subtitle}}

{% endif %} +
+

{{participating.timestamp|naturaltime}} from {{participating.source}}

+ {% else %} +
+

Nothing

+
+ {% endif %} +