mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 23:08:25 +02:00
See #432: genre listing/filtering in Subsonic
This commit is contained in:
parent
904a482698
commit
692e175a6c
4 changed files with 102 additions and 4 deletions
|
@ -263,3 +263,11 @@ class ScrobbleSerializer(serializers.Serializer):
|
|||
return history_models.Listening.objects.create(
|
||||
user=self.context["user"], track=data["id"]
|
||||
)
|
||||
|
||||
|
||||
def get_genre_data(tag):
|
||||
return {
|
||||
"songCount": getattr(tag, "_tracks_count", 0),
|
||||
"albumCount": getattr(tag, "_albums_count", 0),
|
||||
"value": tag.name,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue