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

Expose playing details using API and enable use of Webhooks #246

Closed
JaneX8 opened this issue Apr 28, 2020 · 5 comments
Closed

Expose playing details using API and enable use of Webhooks #246

JaneX8 opened this issue Apr 28, 2020 · 5 comments

Comments

@JaneX8
Copy link
Contributor

JaneX8 commented Apr 28, 2020

For the intergration with home assistant (home-assistant.io). I would love to be able to ask the Navidrome API:

  • Is someone playing something (or is it paused or idle) and what playing position (tracks in queue and position and playing position in current track)?
  • How many total songs, artists and albums are present?

Above method would require a pull. A push would be even better. I would love to see optional/configurable webhooks on a "play", "pause", "stop", "idle" action. Which could be as simple as sending a HTTP GET request to a given URL. That way Navidrome could function as a Trigger in Home Assistant and other tools and easily make cool stuff available like "turn the lights off if Navidrome starts playing", "pause the vacuum cleaner when Navidrome starts playing", "play my favorite playlist when I get home".

Getting the playing position is helpful for automation like "fade on the lights slowly when the last song in the queue is playing the last 20 seconds".

@tcurdt tcurdt mentioned this issue Sep 29, 2021
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

This issue 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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions github-actions bot added the stale label Mar 7, 2023
@tcurdt
Copy link
Contributor

tcurdt commented Mar 7, 2023

Would be cool to have.
But this would probably need some kind of event queue for webhooks?
Not sure how the LastFM scrobbling was implemented - but I see an overlap.

@deluan
Copy link
Member

deluan commented Mar 7, 2023

Thanks for the suggestion.

For the integration with home assistant (home-assistant.io). I would love to be able to ask the Navidrome API:

  • Is someone playing something (or is it paused or idle) and what playing position (tracks in queue and position and playing position in current track)?

Exact position is not possible, as the server does not have control over the clients' playback. The best that can be done is already available in the getNowPlaying endpoint

  • How many total songs, artists and albums are present?

This will most probably be implemented as part of the Subsonic extensions, a joint effort among Subsonic server and clients developers.

Above method would require a pull. A push would be even better. I would love to see optional/configurable webhooks on a "play", "pause", "stop", "idle" action. Which could be as simple as sending a HTTP GET request to a given URL. That way Navidrome could function as a Trigger in Home Assistant and other tools and easily make cool stuff available like "turn the lights off if Navidrome starts playing", "pause the vacuum cleaner when Navidrome starts playing", "play my favorite playlist when I get home".

Push of scrobbles and nowplaying is being implemented as a webhook. See #2229

Getting the playing position is helpful for automation like "fade on the lights slowly when the last song in the queue is playing the last 20 seconds".

As I said above, this level of detail is not possible. The best you can get is how long ago a track started playing, and hope the client did not pause the song.

This issue will be closed once #2229 is merged.

@tcurdt See #2229 :)

@github-actions github-actions bot removed the stale label Mar 8, 2023
@github-actions
Copy link

This issue 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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions github-actions bot added the stale label Sep 13, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants