From ed3669365704a233228600ec38063e6d52f49aeb Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Sat, 9 Apr 2011 01:44:11 +0000 Subject: [PATCH] * If the client doesn't specify a sort order on a music container, default to type, disc, track, then title. --- upnpsoap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/upnpsoap.c b/upnpsoap.c index 69c29b7..62dacb8 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -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 )