Skip to content

Make device id configurable#178

Merged
devgianlu merged 3 commits intolibrespot-org:devfrom
funtax:make_deviceId_configurable
Mar 6, 2020
Merged

Make device id configurable#178
devgianlu merged 3 commits intolibrespot-org:devfrom
funtax:make_deviceId_configurable

Conversation

@funtax
Copy link
Copy Markdown
Contributor

@funtax funtax commented Mar 5, 2020

In my situation, I create multiple instances of librespot-java and each instance can randomly appear & disappear.

To avoid confusion with the deviceId's (mdns), I have to set a persistent deviceId for each instance so an instance doesn't appear twice with the same name and different deviceId.

Please allow to set a permantent deviceId.

@devgianlu
Copy link
Copy Markdown
Member

I think this is not what you're looking for, but rather this. The device ID you are modifying is used only by Spotify and isn't related with MDNS.

@funtax
Copy link
Copy Markdown
Contributor Author

funtax commented Mar 6, 2020

Thanks for checking. I am not publishing the devices via the bundled ZeroconfServer but via a custom (Apple) MDNS-library. Additionally, I am publishing the devices via MDNS and having them authenticated at the same time.

Having the deviceId randomly generated within the package-private Inner-class causes a lot of trouble as I need the value for "getInfo" before the Session is created.

As the Inner-Class (and more) is package-private and cannot be used outside your package.

If one is able to provide the deviceId this would make things more flexible :-)

@devgianlu devgianlu merged commit f645600 into librespot-org:dev Mar 6, 2020
@funtax funtax deleted the make_deviceId_configurable branch March 6, 2020 22:06
@funtax
Copy link
Copy Markdown
Contributor Author

funtax commented Mar 6, 2020

Thank you very much! :)

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

Successfully merging this pull request may close these issues.

2 participants