upnpsoap: Use magic container sort order.
Magic containers can have a pre-defined sort order. Let's use it by default if it exists.
This commit is contained in:
parent
5a309fc48f
commit
b78c25f260
@ -1298,6 +1298,8 @@ BrowseContentDirectory(struct upnphttp * h, const char * action)
|
|||||||
refid_sql = magic->refid_sql;
|
refid_sql = magic->refid_sql;
|
||||||
if (magic->where)
|
if (magic->where)
|
||||||
strncpyt(where, magic->where, sizeof(where));
|
strncpyt(where, magic->where, sizeof(where));
|
||||||
|
if (magic->orderby && !GETFLAG(DLNA_STRICT_MASK))
|
||||||
|
orderBy = strdup(magic->orderby);
|
||||||
if (magic->max_count > 0)
|
if (magic->max_count > 0)
|
||||||
{
|
{
|
||||||
int limit = MAX(magic->max_count - StartingIndex, 0);
|
int limit = MAX(magic->max_count - StartingIndex, 0);
|
||||||
@ -1313,7 +1315,7 @@ BrowseContentDirectory(struct upnphttp * h, const char * action)
|
|||||||
if (!totalMatches)
|
if (!totalMatches)
|
||||||
totalMatches = get_child_count(ObjectID, magic);
|
totalMatches = get_child_count(ObjectID, magic);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if( SortCriteria )
|
if (SortCriteria && !orderBy)
|
||||||
{
|
{
|
||||||
__SORT_LIMIT
|
__SORT_LIMIT
|
||||||
orderBy = parse_sort_criteria(SortCriteria, &ret);
|
orderBy = parse_sort_criteria(SortCriteria, &ret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user