MPD icon indicating copy to clipboard operation
MPD copied to clipboard

Setting a playlist path with http:// scheme doesn't work

Open paradajz opened this issue 1 year ago • 4 comments

I'm hosting my music on a server and I'm streaming from it using my laptop. The server runs python web server in my music directory:

python3 -m http.server

mpd instance on a server is used only so that client mpd instance can fetch database from it. Relevant config on a client (laptop):

music_directory "http://my_server"

database {
    plugin "proxy"
    host "my_server"
    port "6600"
}

This works fine. I can see my music and play anything I want on a laptop. However, on a server I have lots of playlists which aren't loaded because I can't do this:

playlist_directory "http://my_server/Playlists"

mpd complains that the path for playlists must be absolute. Is this intended? Am I doing something wrong?

paradajz avatar Jan 24 '24 23:01 paradajz

Not intended, just not implemented.

MaxKellermann avatar Jan 25 '24 08:01 MaxKellermann

Okay, thanks for the reply. Might want to tackle this myself... I suppose the code handling this isn't much different from path parsing of music_directory? Do you have any tips on where to look and what should be changed?

paradajz avatar Jan 25 '24 08:01 paradajz

It's more difficult. The music_directory is read-only by MPD's definition. The playlist_directory however is writable with MPD commands - clients can edit playlists. How is MPD supposed to edit http:// files? Sure you can do WebDAV PUT, but that's a complex thing to implement. It needs a whole new I/O abstraction in MPD.

Did you know that the music_directory can contain playlist files, too?

MaxKellermann avatar Jan 25 '24 09:01 MaxKellermann

It's more difficult. The music_directory is read-only by MPD's definition. The playlist_directory however is writable with MPD commands - clients can edit playlists. How is MPD supposed to edit http:// files? Sure you can do WebDAV PUT, but that's a complex thing to implement. It needs a whole new I/O abstraction in MPD.

I figured there would be some read/write complications... Okay. Thanks.

Did you know that the music_directory can contain playlist files, too?

I know. And I can actually see them in the library browser, but for some reason I cannot access them (MPD: No such playlist).

Screenshot from 2024-01-25 10-46-33

paradajz avatar Jan 25 '24 09:01 paradajz