[federation] remote catalog importing/playing
Note: this is a meta issue that will probably be split
Assuming we have catalog federation from instance B to instance A, instance A need to be able to browse instance B collections and import from it.
On federation request approval, we will trigger a background import of B catalog on A. Ideally, we'll store on music entities where they were imported from, with a link to the Instance model created in #136 (closed).
Track files will not be imported at first, but hotlinked. The player will request it from instance A, which will in turn proxify the request to instance B. This makes it easier to revoke federation access, and also makes it possible to import big catalogs on small instances, since we don't require additional disk space for the music.
We'll add a layer of cache though, to ensure we don't proxy every audio request to instance B.
To achieve that, we need:
- Additional "imported_from" fields on music entities (Artist, Album, Track, TrackFile, Work)
- Nullable audio_file field on TrackFile, since we'll use the file uuid and imported_from field to serve it
- Some fetch/caching logic on TrakFile and in the /serve endpoint to allow serving from the remote instance
- Using our authentication method from #136 (closed) to authenticate our media request
- A background task that will run every X on instance A to import the catalog from instance B