mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 23:39:16 +02:00
See #170: add a description field on tracks, albums, tracks
This commit is contained in:
parent
424b9f133a
commit
2bc71eecfd
38 changed files with 653 additions and 59 deletions
|
@ -227,6 +227,9 @@ class Artist(APIModelMixin):
|
|||
content_type_field="object_content_type",
|
||||
object_id_field="object_id",
|
||||
)
|
||||
description = models.ForeignKey(
|
||||
"common.Content", null=True, blank=True, on_delete=models.SET_NULL
|
||||
)
|
||||
|
||||
api = musicbrainz.api.artists
|
||||
objects = ArtistQuerySet.as_manager()
|
||||
|
@ -327,6 +330,10 @@ class Album(APIModelMixin):
|
|||
object_id_field="object_id",
|
||||
)
|
||||
|
||||
description = models.ForeignKey(
|
||||
"common.Content", null=True, blank=True, on_delete=models.SET_NULL
|
||||
)
|
||||
|
||||
api_includes = ["artist-credits", "recordings", "media", "release-groups"]
|
||||
api = musicbrainz.api.releases
|
||||
federation_namespace = "albums"
|
||||
|
@ -508,6 +515,10 @@ class Track(APIModelMixin):
|
|||
copyright = models.CharField(
|
||||
max_length=MAX_LENGTHS["COPYRIGHT"], null=True, blank=True
|
||||
)
|
||||
description = models.ForeignKey(
|
||||
"common.Content", null=True, blank=True, on_delete=models.SET_NULL
|
||||
)
|
||||
|
||||
federation_namespace = "tracks"
|
||||
musicbrainz_model = "recording"
|
||||
api = musicbrainz.api.recordings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue