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 407
    • Issues 407
    • 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
  • Merge requests
  • !958

See #170: updates to upload API to support channels publishing

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Agate requested to merge 170-uploads into develop Nov 26, 2019
  • Overview 0
  • Commits 9
  • Pipelines 6
  • Changes 13

See #170 (closed) and also cf https://mastodon.eliotberriot.com/@eliotberriot/103204268225895127

One current blocking point for channels is that we don't have the necessary APIs to provide a decent audio publication experience.

E.g you cannot upload a file, edit the metadata, then come back at it two days later, add some tags, and hit publish.

First of all, there is no current way to tell Funkwhale "please don't use audio tags embedded in the files to infer metadata, use this values as title, artist and album instead". More, currently, once uploaded, a track is picked up immediatly and published.

This MR deals with that by:

  • Adding a new draft option for the import_status column on the upload table so that API clients can prevent an upload to be processed by the workers (this field can be specified during API calls to POST /api/v1/uploads)
  • Support PATCH requests on /api/v1/uploads/<uuid> (only for draft uploads) so that API clients can update audio metadata, audio file, change the library to publish the upload in, etc. Once the client is done, this endpoint can be called with {import_status: pending} to freeze the record and trigger processing from the server
  • Add a new GET /api/v1/uploads/<uuid>/audio-file-metadata endpoint to retrive ID3 / embedded tags from the audio file itself (one use will be to prefill fields in the channel publishing form)
  • Support for specifying {import_metadata: {…}} when creating or patching an upload, to bypass entirely the use of file tags (typical use will be to allow uploads and publication for untagged files)

API documentation was updated to reflect the change.

ready for review, @funkwhale/reviewers-python

Edited Dec 02, 2019 by Agate
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 170-uploads