even more indentation fixes.

This commit is contained in:
Olaf Slomp
2020-03-28 13:15:42 +01:00
parent cec537d70e
commit 716c159648

View File

@ -206,8 +206,8 @@ def user_stats(request):
most_played_artists = PlaylistSong.objects.filter(
user__id=request, state=2,
song_id__isnull=False).values('song__artist').annotate(
total=Count('song__artist')).order_by('-total',
'song__artist')[:settings.STATS_TOP_COUNT]
total=Count('song__artist')).order_by(
'-total', 'song__artist')[:settings.STATS_TOP_COUNT]
most_played_uploaders = PlaylistSong.objects.filter(
user__id=request, state=2).exclude(
@ -230,15 +230,13 @@ def user_stats(request):
user__id=None).values('song__artist', 'song__title').annotate(
total=Count('id', filter=~Q(user__id=request)),
user_total=Count('id', filter=Q(user__id=request))).order_by(
'-total', 'song__artist',
'song__title')
'-total', 'song__artist', 'song__title')
most_played_uploaded_artists = PlaylistSong.objects.filter(
state=2, song_id__in=Song.objects.filter(user__id=request)).exclude(
user__id=None).values('song__artist').annotate(total=Count('song__artist',
filter=~Q(user__id=request)), user_total=Count('id',
filter=Q(user__id=request))).order_by(
'-total', 'song__artist')
filter=Q(user__id=request))).order_by('-total', 'song__artist')
most_played = list(most_played_uploads)
total_played_uploads = 0