This is a requirement for #170 (closed), since we'll need a place to store free-form description relating channels, albums and tracks.
So, what do we have?
common.Content
model that is used to store arbitrary text content (with various supported content types)description
foreign key on the artists, albums and tracks tables, pointing to the model created in 1.description
field exposed when fetching the detailed reprentation of these resources via the API:// GET /api/v1/artists/42
{
// The description has the same structure for album / tracks resources. We use an object instead of a plain string,
// because we have multiple fields (and may want to have even more in the future, e.g to support translations)
"description": {
// content type of the description text. html, plain text and markdown supported
"content_type": "text/markdown",
// raw text, unrendered, for edition
"text": "**hello world**",
// rendered and sanitized HTML from the original text
"html": "<p><strong>hello world</strong></p>"
}
}
content
property).comment
field in ID3/Audio tags, if any, during uploadWhat's not implemented in this MR is the actual display of descriptions in the UI. This will come later.
cc @funkwhale/reviewers-front cc @funkwhale/reviewers-python