Skip to content

Loading…

[UPnP] ignore any requested sort critera, instead use XBMC GUIViewState defaults #1665

Merged
merged 1 commit into from

2 participants

@alcoheca

From looking at user's logs on the forums, some devices routinely pass an 'incorrect' sort method in requests. e.g. sort by title requested for Recently Added nodes. Or sort by date for every node. Until we are modifying our behaviour on a client by client basis, it's best to just ignore the requested method and sort using our defaults.

@elupus elupus was assigned
@elupus
Team Kodi member
@alcoheca alcoheca merged commit edab0b7 into xbmc:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 1 addition and 8 deletions.
  1. +1 −8 xbmc/network/upnp/UPnPServer.cpp
View
9 xbmc/network/upnp/UPnPServer.cpp
@@ -558,20 +558,13 @@ CUPnPServer::OnBrowseDirectChildren(PLT_ActionReference& action,
items.Sort(SORT_METHOD_LABEL, SortOrderAscending);
} else {
CDirectory::GetDirectory((const char*)parent_id, items);
- if(!SortItems(items, sort_criteria))
- DefaultSortItems(items);
+ DefaultSortItems(items);
}
if (items.CacheToDiscAlways() || (items.CacheToDiscIfSlow() && (XbmcThreads::SystemClockMillis() - time) > 1000 )) {
items.Save();
}
}
- else {
- // the file list was cached, but this request may use a different
- // sort_criteria
- if (SortItems(items, sort_criteria))
- items.Save();
- }
// Don't pass parent_id if action is Search not BrowseDirectChildren, as
// we want the engine to determine the best parent id, not necessarily the one
Something went wrong with that request. Please try again.