fatg3erman / RompR

Web client for Mopidy and MPD
https://fatg3erman.github.io/RompR/
Other
191 stars 22 forks source link

Sort File Browser Listing #163

Open NullDev42 opened 1 month ago

NullDev42 commented 1 month ago

I did some searching and I didn't find where this has been asked before, but I assume that it probably has. Is there a way to sort the File Browser listing alphabetically? Is the current sort order file system, mpd, or RompR dependent?

Thank you again for an awesome front-end client!

fatg3erman commented 1 month ago

The current sort order should be the order mpd returns them to me. How mpd decides what that is though is anybody's guess. If you're having a specific issue you can try looking at what order mpd sends them:

telnet your-mpd-host port
lsinfo /

lsinfo "directory name"
lsinfo "directory name/subdirectory name"
etc

If the order they come back in from that is different from the order in RompR then there is a bug.

NullDev42 commented 1 month ago

I should have mentioned on the outset that this clearly isn't a bug but rather a feature request.

From my poking around with the mpd API, it looks like it just spews a file list that's sorted by whatever order the files were originally entered into the database which isn't overly handy.

I did see the "find {FILTER} [sort {TYPE}] [window {START:END}]" command which I think might work. However, I wasn't able to get it to not choke on my FILTER syntax. I thought something like "file == *" would select everything in the database which could then be sorted, but clearly it's looking for something else in the filter field as I only get "{find} Incorrect number of filter arguments" for a response.

fatg3erman commented 1 month ago

Yeah, not much I can do about that. It's very strange, mine does return them in alphabetical order. TBH the file browser doesn't get a lot of attention, I don't really see the point of it.

NullDev42 commented 1 month ago

I must be a rarity then which I guess does not work in my favor. I find the File Browser lets me have more control over how the music is grouped together. The last piece in the puzzle is getting it sorted.

I started a thread on the MPD list requesting help with the filter/sort syntax as wildcards are not clearly explained in the API docs. I'm hoping it's a simple matter of swapping out the "listall" command with something else in RompR.