Folder paths are not stripped
First of all: this stuff amazing. Just managed to set up everything with my new Audio Pro speakers, and it's working great so far!!
I have configured /foo/bar/bax/bat/baz/ as the root of my music directory, i.e. all my music is relative to this folder. I would have expected this long prefix to not appear in my frontends (mpc, web), but the folders are indeed exposed as file:/foo/bar/bax/bat/baz/, i.e. I always need to click through this hierarchy to get to my music, which is bad UX (and sometimes bad UI as well, because the treeview isn't wide enough).
Could this be changed so the prefix is stripped?
Thank you!
Glad to hear it's working well.
I tried on the web, incidently I also have my files under /foo/bar/bax/baz :-) However, I don't see that I need to click through? When I click on the Files view, it shows me "baz" directly. Yes, the breadcrumb shows the entire path, maybe it shouldn't. @hacketiwack what do you think?
I didn't like it either, this is why I created multiple folders in my configuration and with the magic of using a containerised installation, I can hide the full real path.
library {
name = "Music"
directories = { "/Media/Music", "/Media/Books", "/Media/Radios", "/Media/Playlists", "/Media/Podcasts" }
podcasts = { "/Media/Podcasts" }
audiobooks = { "/Media/Books" }
filescan_disable = true
m3u_overrides = true
allow_modifying_stored_playlists = true
default_playlist_directory = "/Media/Playlists"
}
And in my container configuration, I have something similar to this:
Mount=type=bind,source=/srv/media,destination=/Media
Nevertheless, I fully agree with both of you regarding the fact that you don't want to see the full path. However, at the moment, it is impossible to know which part to hide and moreover, the full path is needed by the Server.
Any suggestions is welcome though ☺️
Any suggestions is welcome though ☺️
I would suggest using a dictionary for directories, and then use keys internally and the values for presentation / UI purposes.
Adapting your example above:
library {
name = "Music"
directories = { "/Media/Music" : "Music", "/Media/Books" : "Books", "/Media/Radios" : "Radios, "/Media/Playlists" : "Playlists", "/Media/Podcasts" : "Podcasts"}
podcasts = { "/Podcasts" }
audiobooks = { "/Books" }
filescan_disable = true
m3u_overrides = true
allow_modifying_stored_playlists = true
default_playlist_directory = "/Playlists"
}
(notice how subsequent paths are now relative to the mapping)
If you interpret a missing mapping as the identity, this would even be backwards-compatible!
with the magic of using a containerised installation, I can hide the full real path.
I have containerization and null/bind-mounts, but due to the rather elaborate setup of my music library (🫣), there are a bunch of relative symlinks whose hierarchy I need to be able to resolve, so I still have import the whole thing.
However, I don't see that I need to click through? When I click on the Files view, it shows me "baz" directly. Yes, the breadcrumb shows the entire path, maybe it shouldn't.
For the web-ui, you are correct. However, I use only MPD clients (ncmpcpp, cantata, MALP). And with those, I need click the whole hierarchy.