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

Feature: add navidrome support #503

Merged
merged 3 commits into from Nov 7, 2022

Conversation

ForeverEndeavor
Copy link
Contributor

@ForeverEndeavor ForeverEndeavor commented Nov 7, 2022

This PR adds initial support for displaying now playing song information from Navidrome using the Subsonic API. The widget will display the currently-playing song for all users currently connected to the provided Navidrome server.

Configuration

services.yaml

- Navidrome
    icon: navidrome.png
    href: http://<url>:<port>
    description: Bangers and Kool-Aid Jammers
    widget:
      type: navidrome
      url: http://<url>:<port>
      user: <user>
      token: <token>
      salt: <salt>

For example:

- Navidrome
    icon: navidrome.png
    href: http://localhost:4533
    description: Bangers and Kool-Aid Jammers
    widget:
      type: navidrome
      url: http://localhost:4533
      user: navidrome
      token: 9e686d7eb61b8639642c6dfc26b23c7e
      salt: ca976fd9

Generating salt and token values

Navidrome currently supports Subsonic API version 1.16.1: https://www.navidrome.org/docs/developers/subsonic-api/

For detailed information on how to generate salt and token values for authentication, see the Subsonic API documentation page: http://www.subsonic.org/pages/api.jsp

Preview

homepage-navidrome-example

@shamoon
Copy link
Collaborator

shamoon commented Nov 7, 2022

Thanks for the PR. Im wondering about making this look a bit more like the Plex / Emby 'now playing' widgets e.g. #85 ? Not sure if the API reports data to make the progress bar part work but at least the more compact format would make sense here, I think.

@ForeverEndeavor
Copy link
Contributor Author

ForeverEndeavor commented Nov 7, 2022

Navidrome currently hasn't implemented the jukeboxControl endpoint, so controlling playback would not work. Likewise, the Subsonic API doesn't expose information regarding current offset of the playing song, so I don't think the progress bar part would work either.

I agree re: the compact format comment; it's something I was thinking about as a future implementation given time constraints and the fact that I'm not a seasoned Javascript guy by any means :). The PR was meant to be a simple implementation that would be improved/iterated on over time.

@shamoon
Copy link
Collaborator

shamoon commented Nov 7, 2022

Please take a look at my changes, yields this (screenshot attached) =)
Screen Shot 2022-11-07 at 11 01 34 AM

@ForeverEndeavor
Copy link
Contributor Author

This looks pretty hot. Let me pull the changes and see how multiple users looks with it.

@shamoon
Copy link
Collaborator

shamoon commented Nov 7, 2022

Heh, I had it that way before =)

Please check the last force-push, I fixed the linting issue too

@ForeverEndeavor
Copy link
Contributor Author

Works for multiple users!

One issue is with really long artist/song/album lengths - see example below. Maybe a scrolling option for cases like these?

homepage-navidrome-compact-long-title

@shamoon
Copy link
Collaborator

shamoon commented Nov 7, 2022

Ha, dont sound so surprised 😝

I would say for a purely informational widget in a dashboard app that the length limitation is OK, the other now playing widgets do the same.

@ForeverEndeavor
Copy link
Contributor Author

That's fair - can always bedazzle it later if it's really wanted.

Everything looks good to me!

@shamoon shamoon merged commit 91779a3 into gethomepage:main Nov 7, 2022
@ItsNoted
Copy link

Can this display number of albums and songs too? I'd like to see this information over who's listening to what.

Copy link
Contributor

github-actions bot commented Feb 6, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.

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

Successfully merging this pull request may close these issues.

None yet

3 participants