From a269949a23e6bf6cd2c85b7663ffc4c53d1c0dca Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 16 Apr 2024 15:17:23 -0400 Subject: [PATCH] [scrobbles] Add webpages to status --- 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 ea200a7..9775125 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -762,6 +762,9 @@ class ScrobbleStatusView(LoginRequiredMixin, TemplateView): data["sporting"] = progress_plays.filter( sport_event__isnull=False ).first() + data["browsing"] = progress_plays.filter( + web_page__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 6a0a6eb..f9205e6 100644 --- a/vrobbler/templates/scrobbles/status.html +++ b/vrobbler/templates/scrobbles/status.html @@ -118,5 +118,19 @@ {% endif %} +

Browsing

+
+ {% if browsing %} +
+

{{browsing.media_obj}}

+ {% if browsing.media_obj.subtitle %}

{{browsing.media_obj.subtitle}}

{% endif %} +
+

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

+ {% else %} +
+

Nothing

+
+ {% endif %} +