Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 408
    • Issues 408
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Issues
  • #137
Closed
Open
Issue created Mar 24, 2018 by Agate@agateMaintainer

[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
Assignee
Assign to
Time tracking