mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 13:59:15 +02:00
Added HTML link in non-channel Audio JSON-LD representations
This commit is contained in:
parent
e20ef24c4c
commit
806ab2b3f0
2 changed files with 24 additions and 10 deletions
|
@ -1157,11 +1157,18 @@ class UploadSerializer(jsonld.JsonLdSerializer):
|
|||
"bitrate": instance.bitrate,
|
||||
"size": instance.size,
|
||||
"duration": instance.duration,
|
||||
"url": {
|
||||
"href": utils.full_url(instance.listen_url),
|
||||
"type": "Link",
|
||||
"mediaType": instance.mimetype,
|
||||
},
|
||||
"url": [
|
||||
{
|
||||
"href": utils.full_url(instance.listen_url),
|
||||
"type": "Link",
|
||||
"mediaType": instance.mimetype,
|
||||
},
|
||||
{
|
||||
"type": "Link",
|
||||
"mediaType": "text/html",
|
||||
"href": utils.full_url(instance.track.get_absolute_url()),
|
||||
},
|
||||
],
|
||||
"track": TrackSerializer(track, context={"include_ap_context": False}).data,
|
||||
}
|
||||
if instance.modification_date:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue