dassystem writes

Hi there,

I use upplay together with minidlna and gmrender-resurrect on a raspberry pi. When I open an album, it is orderd by title, not by tracknumber. That’s fine, because I think it is caused by the bad dlna-server.

But when I add the album to the upplay playlist, there is no option to sort the songs bei tracknumber. I think, it should be possible to implement since the tracknumber is saved into the mp3-file’s metadata and isn’t dependent to the information provided by the server.

medoc92 writes

I think it would be a good idea to provide a sort function, which I’d rather imagine on the directory listing side actually, as this seems more natural than on the playlist side (the end result would be the same: adding an album sorted by track number would create a playlist sorted by track numbers).

it seems to me that minidlna sorts by file name. One possible approach for a quick solution to your problem would be to use a tag manager like easytag to rename the files as someting like tnum-restofname.mp3

Pastim writes

All my files have disc then track number, followed by the title (d-tt - title). I’ve found that useful when checking the folders and albums (to make sure nothing is missing), as well as providing UPnP with tracks sorted in disc (where you have multi-volume discs) and track number.

dassystem writes

It’s pretty usefull yes. But it doesn’t solve the problem of the missing sort-function in upplay.

I appreciate your advices, but I don’t want to change all my mp3-filenames. What if a friend drops by with an usb drive of his favorite music, but not named in the "tnum-restofname.mp3" style? Should I rename all his files first?

What if I want to hear all albums of one band in chronological order? We need a sort function.

medoc92 writes

I do agree with the usefulness of a sort function, and I intend to add it to upplay. The file naming suggestion was just a short-term workaround.

Also and by the way "all the albums of a band in chronological order" is not so simple as it seems. Any sorting performed by upplay will be on tracks. "album date" is an interesting can or worms when you think of it, as there is no way to actually store this in the file system, so the media server has to synthetize it. Maybe some media servers have conventions to work around this (some kind of sidecar file could be used I guess), but I’m not aware of any.

medoc92 writes

I have added a dialog to set local sort criteria. You can check out the latest git code if you want to try it. You need to check out and rebuild libupnpp too.

Pastim writes

From a brief test I’d have thought this was much more useful on the playlist side. To get a meaningful set of tracks from different albums on the selection side is well nigh impossible for me without getting thousands on items.

To sort by track don’t you also need to sort by disc for those of us with multiple disc sets?

I’m being dim, but I’m not sure what the filename ordering within folder hierarchy does (I use minimserver). I don’t understand the results.

medoc92 writes

This is a first prototype. I am going to add sort options on the playlist side too.

I don’t think that UPnP has any notion of disc numbers. If you want this to be taken into account, you need to append the disc number to the album title. From the minimserver documentation, it seems that the other option is to have a single album title, and use DISCNUMBER tags, in which case minimserver merges the track number lists (no problem for sorting then).

I think that the directory-side sorting facility is mostly useful on lengthy compilations. For example on the Rolling Stone best 500 songs compil, it makes it easy to go through all songs from a single artist (sorting by artist then track number instead of the default tracknum/artist).

filename ordering within folder hierarchy is useful in case the files are properly named but the tags are wrong. I think that there are users for whom file names are the primary classification. With an artist/album/tno-title.xx naming scheme, you can mostly dispense with tags if you are so inclined. This is especially true for compilations ordered by file names, with wrong track number tags. Some media servers always keep the file name order inside the "browse by folders" hierarchy, which I prefer. Minim does not work like this, and the option allows restoring the file name ordering behaviour.