Data structure
Podcast and music artists actors
Artist object can be linked to an actor. Artist content_category can be “music” or “podcast”. For podcast : artist.album are podcast series,and tracks are podcast episodes.
Local rss feed :
artist.actor is local
External rss feed :
artist.attributed_to == service_actor
External ap rss feed (imported into the funkwhale network through another pod):
artist.attributed_to == remote_service_actor
Music Rss feed
Funkwhale allow 4 sources of metadata for artist objects:
ActivityPub Actors, what we call
Channels(local or remote)Audio files metadata (local and remote)
Rss feed (only remote)
Musicbrainz ids (for audio files metadata, in the future should also work for rss feeds ?)
This diversity make Funkwhale very interoperable but a problem arise : where is the source of truth ? How can we handle artist impersonation (eg fake artist accounts) ?
Cases
Audio file metadata with mbid
Currently the first uploader and the admins of the pod can change the metadata of the audio objects even if there is a mbid associated with it. This changes will propagate through federation and remote instance will not have the power to change the metadata since they don’t own the music object. On top of that this can lead to inconstenties across the network (for example two artists with the same mbid are upload in two pods, they have a different fid but the same mbid -> clash -> federation fail)
This is why we have to force the pods to follow musicbrainz metadata when objects have a mbid.
Audio file metadata without mbid
The first pod and uploader have the power to change the metadata.
If the same artist is uploaded once with mbid and once without -> duplicate artist. There is nothing we can do againsts this. The pod admins can enforce mbids for audio file metadata if they want to avoid duplicates.
Channel with mbids
If we want artist channels track to be linked with track uploaded from elsewhere Channel.artist or Channel should be allowed to have mbid. If we allow Channel.artist to have a mbis -> might clash with already existing artist objects. We could update the artist objects that clash by updating them and deleting one of them. What we cannot do is manage the case where two channels have the same mbid. One of them is lying/doing impersonnation. The only solution here is to warm the pod admins. They should agree and resolve the conflict manually.
Another issue exists : who do we trust between the channel and musicbrainz ? An attacker could create a Channel and post wrong metadata (link fake buying links). This fake account would propagate through federation utils, eventually, it clash with another Channel having the same mbid. The most safe approach is to rely on musicbrainz metadata since it centralize moderation protecting against pod admins with fraudulent aims. But this make the artists dependent from this service.
Rss feeds
If we implement music rss feeds Funkwhale will be able to import artists from third party source like Faircamp, ampache, crero, etc.
If two pod import the same rss feed ? -> two different actor -> duplicates. Could be solved easily using the rss feed url (which is the real URI of this object instead of the actor)
The problem arise when the rss feed returns mbids. If there is two of them with the same mbid -> clash/impersonnation / or the artist has various websites posting rss feeds. We should reject importing rss feed with a mbid if we already have an artist channel with the same mbid. The user making the request should be redirected to the channel. If it’s a fake channel the user should be hable to make a request to the pod admins.
To serve Rss feed through federation, Funkwhale create an AP Actor (a channel) serving the rss feed metadata. We should make sure this automatically created Actor never have the priority on artist channels. Artist Channel owner should be informed when a rss feed with their mbid is imported
How mastodon do it
They cross-reference the links by looking on the linked page if it link backs to the profile with a rel=me attribute. See https://docs.joinmastodon.org/user/profile/#verification.
This is not doable for platforms like sprotify/bandcamp/etc. But we could use mbid has a central authority.
Conclusion
This is the hierarchy :
MB : allows centralization and verification (but we rely on mb moderation)
AP : admins pods should agree and resolve the conflict manually. But fraudulent pods can be created.
RSS : the source of the feed can lie, but we can rely on AP and MB
Another whay to see it :
rss-feed -> rss url is the source of truth -> conflict with mbid.
channel -> AP server is the source of truth -> conflict with mbid.
audio metadata with mbid -> musicbrainz is the source of truth
audio metadata without mbid -> first uploader AP server is the source of truth
Track Ap object vs Audio Ap object
Some project (like mastodon) only support a minimal Audio object. They don’t have Tracks. Funkwhale can create tracks from receive audio objects but this doesn’t support all the features (multiples artists).
Problem : when we update a track should we send an update on the audio or on the track object ?
For better compatibility we send an update on the audio object -> remote will fetch the audio fid -> Upload serializer will return the updated data. A Funkwhale instance should properly update the track while other project will use what they can.