* If the client doesn't specify a sort order on a music container, default to type, disc, track, then title.

This commit is contained in:
Justin Maggard 2011-04-09 01:44:11 +00:00
parent 07c5fd5dd6
commit ed36693657

View File

@ -1082,6 +1082,14 @@ BrowseContentDirectory(struct upnphttp * h, const char * action)
else
asprintf(&orderBy, "order by length(OBJECT_ID), OBJECT_ID");
}
else if( strncmp(ObjectId, MUSIC_ID, strlen(MUSIC_ID)) == 0 )
{
#ifdef __sparc__
if( totalMatches < 10000 )
#endif
asprintf(&orderBy, "order by o.CLASS, d.DISC, d.TRACK, d.TITLE");
}
}
/* If it's a DLNA client, return an error for bad sort criteria */
if( (args.flags & FLAG_DLNA) && ret )