mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 13:25:49 +03:00
[GH-ISSUE #80] Command line parameters #63
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Willyarma on GitHub (Sep 6, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/80
I had written a node.js wrapper for librespot-java, it was capable of spawning multiple instances of librespot-java.
I was using the command line options --deviceName and --player.mixerSearchKeywords so that I could map each instance to a different audio devcie and name it of course.
I didnt have any trouble with having a single config file for all instances.
Would it possible to add this to the go version? Would it work?
@Willyarma commented on GitHub (Sep 11, 2024):
I'm just testing out this version now.
I noticed that it dosent report available audio devices, can this be added too? Perhaps as part of the status get request?
@devgianlu commented on GitHub (Sep 23, 2024):
@Willyarma If you are willing to have multiple configuration files you can use
-config_pathand-credentials_pathto specify the position of those two.@Willyarma commented on GitHub (Sep 23, 2024):
Thanks, I'll try it out!
Overriding parameters from the command line would be nicer and avoid messy multiple config files but this ought to work for what I want to do.
Is this new or did I completely miss it?
@Willyarma commented on GitHub (Sep 23, 2024):
I've been struggling to get it working, not sure where the problem lies, whether its node.js, go or me.
When I use the child_process.spawn function from node.js, go-librespot completley ignores the command line arguments unless I set the shell flag option to true so that it runs inside a shell instead of directly.
This worked fine on the java version.
Appears to work with 2 players going at once with different names, API ports and audio devices.
@devgianlu commented on GitHub (Sep 23, 2024):
@Willyarma You may need to pass each parameter as different element of the command array:
Unlucikly making each of the configurable options available as a command line flag would require a lot of redundant code, so I am a bit esitant to do it.
@Willyarma commented on GitHub (Sep 23, 2024):
That worked! :) Thanks! Can't believe it was that simple.
It's working with multiple config files so am happy with that.
Unless anybody else wants this feature, I guess it can be closed.
@devgianlu commented on GitHub (Sep 23, 2024):
Closing for now!