From 83b6ba9cc38c16e72445f28b3d5c27d892a2a426 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Wed, 11 Jan 2023 11:55:44 -0500 Subject: [PATCH] Add tabs and clean up main page --- vrobbler/apps/scrobbles/views.py | 2 +- .../templates/scrobbles/scrobble_list.html | 209 ++++++++++-------- 2 files changed, 117 insertions(+), 94 deletions(-) diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index fea66bb..99bd92c 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -75,7 +75,7 @@ class RecentScrobbleList(ListView): def get_queryset(self): return Scrobble.objects.filter( track__isnull=False, in_progress=False - ).order_by('-timestamp')[:25] + ).order_by('-timestamp')[:15] @csrf_exempt diff --git a/vrobbler/templates/scrobbles/scrobble_list.html b/vrobbler/templates/scrobbles/scrobble_list.html index a5d541c..13b456f 100644 --- a/vrobbler/templates/scrobbles/scrobble_list.html +++ b/vrobbler/templates/scrobbles/scrobble_list.html @@ -3,7 +3,7 @@ {% block content %} -
+

Dashboard

@@ -18,108 +18,131 @@
- +
+ +
+

Today {{counts.today}} | This Week {{counts.week}} | This Month {{counts.month}} | This Year {{counts.year}} | All Time {{counts.alltime}}

+
-

Top artists this week

-
- - - - - - - - - {% for artist in top_weekly_artists %} - - - - - {% endfor %} - -
#Artist
{{artist.num_scrobbles}}{{artist.name}}
+ + +
+
+

Top artists this week

+
+ + + + + + + + + {% for artist in top_weekly_artists %} + + + + + {% endfor %} + +
#Artist
{{artist.num_scrobbles}}{{artist.name}}
+
+
+ +
+

Top tracks this week

+
+ + + + + + + + + + {% for track in top_weekly_tracks %} + + + + + + {% endfor %} + +
#TrackArtist
{{track.num_scrobbles}}{{track.title}}{{track.artist.name}}
+
+
-
-

Top tracks this week

-
- - - - +
+ + +
+
+

Latest listened

+
+
#
+ + + - - - - {% for track in top_weekly_tracks %} - - - - - - {% endfor %} - -
Time Track Artist
{{track.num_scrobbles}}{{track.title}}{{track.artist.name}}
+ + + + {% for scrobble in object_list %} + + {{scrobble.timestamp|naturaltime}} + {{scrobble.track.title}} + {{scrobble.track.artist.name}} + + {% endfor %} + + +
-
-
-
-
-
-
-

Latest listened

-

Today {{counts.today}} | This Week {{counts.week}} | This Month {{counts.month}} | This Year {{counts.year}} | All Time {{counts.alltime}}

-
- - - - - - - - - - - {% for scrobble in object_list %} - - - - - - - {% endfor %} - -
TimeTrackArtistSource
{{scrobble.timestamp|naturaltime}}{{scrobble.track.title}}{{scrobble.track.artist.name}}{{scrobble.source}}
-
-
-
-

Latest watched

-
- - - - - - - - - - - {% for scrobble in video_scrobble_list %} - - - - - - - {% endfor %} - -
TimeTitleSeriesSource
{{scrobble.timestamp|naturaltime}}{% if scrobble.video.tv_series %}E{{scrobble.video.season_number}}S{{scrobble.video.season_number}} -{% endif %} {{scrobble.video.title}}{% if scrobble.video.tv_series %}{{scrobble.video.tv_series}}{% endif %}{{scrobble.source}}
+
+

Latest watched

+
+ + + + + + + + + + + {% for scrobble in video_scrobble_list %} + + + + + + + {% endfor %} + +
TimeTitleSeriesSource
{{scrobble.timestamp|naturaltime}}{% if scrobble.video.tv_series %}E{{scrobble.video.season_number}}S{{scrobble.video.season_number}} -{% endif %} {{scrobble.video.title}}{% if scrobble.video.tv_series %}{{scrobble.video.tv_series}}{% endif %}{{scrobble.source}}
+