diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index db50a63..77cb9dc 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -475,20 +475,39 @@ class ChartRecordView(TemplateView): context_data["artist_charts"] = {} if not date: + limit = 20 artist_params = {'user': user, 'media_type': 'Artist'} context_data['current_artist_charts'] = { - "today": live_charts(**artist_params, chart_period="today"), - "week": live_charts(**artist_params, chart_period="week"), - "month": live_charts(**artist_params, chart_period="month"), - "all": live_charts(**artist_params), + "today": live_charts( + **artist_params, chart_period="today", limit=limit + ), + "week": live_charts( + **artist_params, chart_period="week", limit=limit + ), + "month": live_charts( + **artist_params, chart_period="month", limit=limit + ), + "year": live_charts( + **artist_params, chart_period="year", limit=limit + ), + "all": live_charts(**artist_params, limit=limit), } track_params = {'user': user, 'media_type': 'Track'} context_data['current_track_charts'] = { - "today": live_charts(**track_params, chart_period="today"), - "week": live_charts(**track_params, chart_period="week"), - "month": live_charts(**track_params, chart_period="month"), - "all": live_charts(**track_params), + "today": live_charts( + **track_params, chart_period="today", limit=limit + ), + "week": live_charts( + **track_params, chart_period="week", limit=limit + ), + "month": live_charts( + **track_params, chart_period="month", limit=limit + ), + "year": live_charts( + **track_params, chart_period="year", limit=limit + ), + "all": live_charts(**track_params, limit=limit), } return context_data diff --git a/vrobbler/templates/scrobbles/chart_index.html b/vrobbler/templates/scrobbles/chart_index.html index bffe630..d62f94d 100644 --- a/vrobbler/templates/scrobbles/chart_index.html +++ b/vrobbler/templates/scrobbles/chart_index.html @@ -67,7 +67,7 @@ {% endfor %} @@ -110,7 +110,7 @@ {% endfor %} diff --git a/vrobbler/templates/scrobbles/scrobble_list.html b/vrobbler/templates/scrobbles/scrobble_list.html index bfefb15..7208459 100644 --- a/vrobbler/templates/scrobbles/scrobble_list.html +++ b/vrobbler/templates/scrobbles/scrobble_list.html @@ -88,7 +88,7 @@