Commit Graph

2 Commits

Author SHA1 Message Date
Henrik Friedrichsen
e6ed4ea024 Support multiple IPC sockets (#1171)
For instance for when multiple ncspot instances are running. In that case the
PID will be appended to the path, i.e. `~/.cache/ncspot/ncspot.20707.sock`.

Also ncspot will now delete the socket on shutdown.

Fixes #1158
2023-05-22 22:14:59 +02:00
Henrik Friedrichsen
ec4b7c209a Create IPC socket on UNIX platforms (#1018)
* Create IPC socket on UNIX platforms

Creates an IPC socket which remote programs/scripts can connect to. This
can be used to control ncspot or fetch the current playback status.

At the moment, only remote control is implemented. Next step is to send
the current player status as a JSON object.

Fixes #524

* Publish status changes to connected sockets

Whenever the playback mode (playing, paused, stopped) or the track changes, all
socket listeners will be notified.

Fixes #924, fixes #1019

* Document IPC feature
2022-12-28 19:01:59 +01:00