What I'm trying to do
I want to tell mpd to play a file from the hard drive (adding it to the queue). I do not want it to build any database over some folder. Just add a URI to the queue. A few seconds before the track is over I will add the next track to the queue (and might add crossfade parameter)
What I tried
I tried add URI and got the error no database. Well, I really don't want the MPD process to mingle with files and databases. I just want to add to the QUEUE what to play at that moment and be able to specify crossfade for each occasion.
What I've done
I've read in the default configuration file that disabling the music directory, playlists, etc will allow me to add/play the file over IPC socket. So, I modified the code to work with AF_UNIX sockets. I can connect, send commands, read the return codes and results. But how do I send the file using the file:// protocol as indicated in the config file? What command should I use?
Any help would be greatly appreciated.
How to send files over ipc socket
Re: How to send files over ipc socket
The "add" command.
Re: How to send files over ipc socket
Add command responded with exception no database even though in my mpd config everything related to files, directories and db is disabled.
Maybe I'm the format wrong?
Lets assume file is located at /storage/file.mp3
I issued
add file:/storage/file.mp3
response was exception no database.
Maybe I'm the format wrong?
Lets assume file is located at /storage/file.mp3
I issued
add file:/storage/file.mp3
response was exception no database.
Re: How to send files over ipc socket
Hi Max, I managed to get it to work. With the URI formatted as file:///storage/file.mp3 it eventually worked. Not really sure why it wasn't working earlier.
Sorry for taking your time with such trivial bug.
Best,
p.t.
Sorry for taking your time with such trivial bug.
Best,
p.t.