Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook scrobbler #2229

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

kgarner7
Copy link
Contributor

@kgarner7 kgarner7 commented Mar 6, 2023

This PR adds the ability to send scrobbles to one or more arbitrary endpoints. It's really only useful for people who want to display their now playing status. The expected interface is inspired by Listenbrainz. I'd be very open to discussing a better API spec (it shouldn't be hard to do).

Isn't this basically ListenBrainz, but for multiple endpoints? Pretty much.

Error response
On an error, the endpoint MUST respond with JSON with the following properties:

  • error: int, a non-zero value
  • message: the specific error message

Mandatory parameters:

  • token: the specific user token
  • apiKey: an api key for the server

/validate
A webhook MUST have an endpoint BASE_URL/validate that accepts POST requests with JSON body with the mandatory parameters

On a success the server MUST respond with JSON with one key:

  • userName: the respective user name

/scrobble
A webhook MUST have an endpoint BASE_URL/scrobble that accepts a POST request with JSON with mandatory parameters, as well as:

  • album: string, the track album. Can be empty string
  • albumArtist: string, the album artist. Can be empty
  • artist: string, the track artist
  • duration: int, length of the track in seconds. required
  • mbid: musicbrainz track id. can be empty
  • track: the track title. required
  • trackNumber: the number of the track. Can be zero.

On a success, the server MUST respond with an empty JSON object.

@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Download the artifacts for this pull request:

@Skarlett
Copy link

This would be really nice with last.fm too

@github-actions
Copy link

This PR has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help.
Please check https://github.com/navidrome/navidrome/blob/master/CONTRIBUTING.md#pull-requests and verify that this code contribution fits with the description. If yes, tell it in a comment.
This PR will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants