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

Enable playlist search #160

Open
dhalem opened this issue Apr 22, 2023 · 5 comments
Open

Enable playlist search #160

dhalem opened this issue Apr 22, 2023 · 5 comments

Comments

@dhalem
Copy link
Contributor

dhalem commented Apr 22, 2023

I'd love to be able to search by playlist. Happy to add it myself with some pointers.

@simojenki
Copy link
Owner

I'm not sure I follow, do you mean;
Search for a playlist?
Search within a playlist?

@dhalem
Copy link
Contributor Author

dhalem commented Apr 22, 2023

I want to search for a playlist by name in the sonos app and find it on ND via bonob.

@simojenki
Copy link
Owner

Doesn't look like the subsonic api supports that, so would require a custom ND driver, which is a WIP. I'll look to integrate this feature into that change

@dhalem
Copy link
Contributor Author

dhalem commented Apr 27, 2023

I started to play around adding this and seem to have an issue where my Sonos system isn't seeing the updated PresentationMap. Have you seen something like this? Any way to flush old service definitions that you know of?

@simojenki
Copy link
Owner

yes, I recall this happening. There are a few things that I have used in the past to try and make things a bit more predictable when testing.

The presentation map (and strings.xml) are versioned in the sonos device, currently bonob is up to version 23.
https://github.com/simojenki/bonob/blob/master/src/sonos.ts#L30
So when either the presentation map or strings.xml changes I try to remember to bump the version so that peoples devices pull the latest config.

However when working locally in dev mode and testing it having to bump the version manually is annoying so I added the BNB_DEBUG env var which will use system time as the version. So every time you restart you get a new version. Obviously this value is much larger that 23 so it is best to use this only when register a different service than the one you use day to day. This is why yarn dev or yarn devr register a service name of z_bonobDev, so that it is not the same as my normal bonob/ND instance.
see: https://github.com/simojenki/bonob/blob/master/src/sonos.ts#L27

The other thing that i recall happening is that the sonos device itself will cache things, or perhaps the client on your phone does. So in past I have closed the app and re-opened it when I restart local dev bonob. I use an iPhone, so I just close the app, thus forcing it to start up again.

Hope that helps.

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

No branches or pull requests

2 participants