xbmc/xbmc — pull request #5977 by Montellese (2014-12-20 08:34:00+00:00)
Title: sorting: fix Container.SetSortMethod (fixes #15627)

This fixes the builtin `Container.SetSortMethod()` (see http://trac.kodi.tv/ticket/15627). When I wrote the sorting refactor we switched from sort methods like `SORT_METHOD_TITLE_IGNORE_THE` to a combination of `SortByTitle` and `SortAttributesIgnoreArticle`. Therefore I changed all the logic in `CGUIViewState` to take a `SortBy` and a `SortAttributes` parameter.
But we don't always know the `SortAttributes` parameter (e.g. in the mentioned `Container.SetSortMethod()` builtin. Furthermore there's no case where we use the same `SortBy` value with different `SortAttributes` values in the same view. So knowing the `SortBy` value is enough to identify the sort method to be used.

This is broken since the sorting refactor so certainly also in Gotham. It could go into a Helix point release.