sessions / 619718c045972bff546df40bb303601300cd5af0

/home/powellc/src/code.unbl.ink/secstate/vrobbler

This commit has no recorded session.

diff

ignore whitespace

commit 619718c045972bff546df40bb303601300cd5af0Author: Colin Powell <colin@unbl.ink>Date:   Tue Jun 30 16:04:09 2026 -0400    [charts] Fix chart page missing tablesdiff --git a/vrobbler/apps/charts/views.py b/vrobbler/apps/charts/views.pyindex 65fd547..d5882eb 100644--- a/vrobbler/apps/charts/views.py+++ b/vrobbler/apps/charts/views.py@@ -233,55 +233,67 @@ class ChartRecordView(TemplateView):             },         } +        # List-group tables default to week-level when no date param (matches active tab)+        if not date_param:+            list_year = current_year+            list_month = None+            list_week = current_week+            list_day = None+        else:+            list_year = year+            list_month = month+            list_week = week+            list_day = day+         context["charts"] = {             "artist": list(                 self.get_charts_for_period(-                    user, "artist", year=year, month=month, week=week, day=day, limit=20+                    user, "artist", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "album": list(                 self.get_charts_for_period(-                    user, "album", year=year, month=month, week=week, day=day, limit=20+                    user, "album", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "track": list(                 self.get_charts_for_period(-                    user, "track", year=year, month=month, week=week, day=day, limit=20+                    user, "track", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "tv_series": list(                 self.get_charts_for_period(-                    user, "tv_series", year=year, month=month, week=week, day=day, limit=20+                    user, "tv_series", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "video": list(                 self.get_charts_for_period(-                    user, "video", year=year, month=month, week=week, day=day, limit=20+                    user, "video", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "board_game": list(                 self.get_charts_for_period(-                    user, "board_game", year=year, month=month, week=week, day=day, limit=20+                    user, "board_game", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "book": list(                 self.get_charts_for_period(-                    user, "book", year=year, month=month, week=week, day=day, limit=20+                    user, "book", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "food": list(                 self.get_charts_for_period(-                    user, "food", year=year, month=month, week=week, day=day, limit=20+                    user, "food", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "podcast": list(                 self.get_charts_for_period(-                    user, "podcast", year=year, month=month, week=week, day=day, limit=20+                    user, "podcast", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),             "trail": list(                 self.get_charts_for_period(-                    user, "trail", year=year, month=month, week=week, day=day, limit=20+                    user, "trail", year=list_year, month=list_month, week=list_week, day=list_day, limit=20                 )             ),         }diff --git a/vrobbler/templates/scrobbles/_top_charts.html b/vrobbler/templates/scrobbles/_top_charts.htmlindex f3ca877..d2c1c37 100644--- a/vrobbler/templates/scrobbles/_top_charts.html+++ b/vrobbler/templates/scrobbles/_top_charts.html@@ -97,7 +97,7 @@             <div style="display:block">                 <div style="float:left;">                     <div class="image-wrapper" style="display:flex; flex-wrap: wrap; margin:0">-                        <div class="caption">#1 {{albums.0.album.title}}</div>+                        <div class="caption">#1 {{albums.0.album.name}}</div>                         {% if albums.0.album.cover_image %}                         <a href="{{albums.0.album.get_absolute_url}}"><img src="{{albums.0.album.cover_image_medium.url}}" width="300px"></a>                         {% else %}@@ -111,7 +111,7 @@                         {% with albums|get_item:forloop.counter as album %}                         {% if album %}                         <div class="image-wrapper" style="width:50%">-                            <div class="caption-medium">#{{forloop.counter|add:1}} {{album.album.title}}</div>+                            <div class="caption-medium">#{{forloop.counter|add:1}} {{album.album.name}}</div>                             {% if album.album.cover_image %}                             <a href="{{album.album.get_absolute_url}}"><img src="{{album.album.cover_image_medium.url}}" width="150px"></a>                             {% else %}@@ -130,7 +130,7 @@                         {% with albums|get_item:idx as album %}                         {% if album %}                         <div class="image-wrapper" style="width:33%">-                            <div class="caption-small">#{{forloop.counter|add:5}} {{album.album.title}}</div>+                            <div class="caption-small">#{{forloop.counter|add:5}} {{album.album.name}}</div>                             {% if album.album.cover_image %}                             <a href="{{album.album.get_absolute_url}}"><img src="{{album.album.cover_image_medium.url}}" width="100px"></a>                             {% else %}