[music] Tracks can have multiple artists
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
from charts.models import ChartRecord
|
||||
from django.db.models import Count
|
||||
from django.views import generic
|
||||
from music.models import Album, Artist, Track
|
||||
from charts.models import ChartRecord
|
||||
from scrobbles.stats import get_scrobble_count_qs
|
||||
|
||||
from scrobbles.views import ScrobbleableListView, ScrobbleableDetailView
|
||||
from scrobbles.views import ScrobbleableDetailView, ScrobbleableListView
|
||||
|
||||
|
||||
class TrackListView(ScrobbleableListView):
|
||||
@ -64,7 +63,7 @@ class ArtistDetailView(generic.DetailView):
|
||||
from scrobbles.models import Scrobble
|
||||
|
||||
context_data["recent_scrobbles"] = (
|
||||
Scrobble.objects.filter(track__artist=artist)
|
||||
Scrobble.objects.filter(track__artists=artist)
|
||||
.select_related("track", "track__album")
|
||||
.order_by("-timestamp")[:100]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user