tkem / mopidy-dleyna

Mopidy extension for playing music from Digital Media Servers
Apache License 2.0
18 stars 5 forks source link

minidlna: Wrong sort order when browsing large collections #31

Open tkem opened 8 years ago

tkem commented 8 years ago

Might be a server-side (minidlna) issue -- when browsing "All Music", items are sorted partially, probably matching batch size.

tkem commented 8 years ago

For this to work, dLeynaClient.browse should get an extra order parameter, and use ListChildrenEx, of course. Sort order should be checked with the device's SortCaps. Somehow assumed this was already implemented...

tkem commented 8 years ago

Probably needs new config settings: upnp_browse_order, upnp_search_order: list of types, actual filter is intersection with device sort caps. Requires a new minor release version (v1.1).

tkem commented 8 years ago

Calling ListChildrenEx with sort order set to +DisplayName shows the same behavior. Sort order seems to be honored for the first n (~1000) items only. Note this seems to be independent of batch size -- setting upnp_browse_limit to 10 shows the same behavior (first ~1000 items sorted ok, then starting from "a"). WTF?

tkem commented 8 years ago

Another issue with using SortCaps would be how to distinguish between albums, which should probably be sorted by track number, and other directories, which are to be sorted by name.

tkem commented 8 years ago

Sort order improvements will be tracked in #37.

tkem commented 8 years ago

This might be an explanation, however __sparc__ should not be defined on the test server: http://sourceforge.net/p/minidlna/git/ci/v1_1_4/tree/upnpsoap.c#l75