clangen / musikcube

a cross-platform, terminal-based music player, audio engine, metadata indexer, and server in c++
https://musikcube.com
BSD 3-Clause "New" or "Revised" License
4.23k stars 295 forks source link

local control of musikcubed #480

Open acook opened 2 years ago

acook commented 2 years ago

It would be great to be able to run musikcubed --start and then be able to control it from the local musikcube CLI.

From looking around the code, the Ui seems pretty tightly coupled to the backend so this might be tricky.

clangen commented 2 years ago

Can you explain your specific use-case? The musikcube TUI client supports connecting "external" (aka "remote") instances, like those running in daemons and on other computers.

You should be able to do the following:

  1. Start the musikcube TUI app and add any paths you want indexed (you've probably already done this).
  2. Quit musikcube, then start the musikcubed daemon
  3. Start musikcube now that the daemon is running the server, then switch to settings and change library type to remote and use localhost as your hostname. It should connect to the running daemon.  image
acook commented 2 years ago

Interesting, I didn't notice that. Super cool for streaming to my other devices.

However, my goal was to have the daemon play the music so I could exit the UI and not interrupt playback.

clangen commented 2 years ago

Got it. Yeah, this is something that has already been implemented in the musikdroid Android app, and I'd like to bring to the TUI as well. It's fully supported by the SDK and server plugin, it just needs to be implemented in the desktop app.

It'll require implementing the IPlaybackService interface to use the WebSocket API provided by the server.

acook commented 2 years ago

There was an old ticket mentioning the feature, but I can't find it now.

Being able to kill my terminal is nice, but I noticed it the most when I was having to constantly stop the player to test a new configuration or load in a new color theme. It interrupted my flow haha