Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix sorting of movies linked to a tvshow in "All seasons" list (fixes…

… #13397)
  • Loading branch information...
commit af503a57b151edf422c61dd3f458136fc0a4265e 1 parent d8664cb
@Montellese Montellese authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 xbmc/utils/SortUtils.cpp
View
11 xbmc/utils/SortUtils.cpp
@@ -284,8 +284,14 @@ string ByEpisodeNumber(SortAttribute attributes, const SortItem &values)
else
num = ((uint64_t)values.at(FieldSeason).asInteger() << 32) + (values.at(FieldEpisodeNumber).asInteger() << 16);
+ std::string title;
+ if (values.find(FieldMediaType) != values.end() && values.at(FieldMediaType).asInteger() == MediaTypeMovie)
+ title = BySortTitle(attributes, values);
+ if (title.empty())
+ title = ByLabel(attributes, values);
+
CStdString label;
- label.Format("%"PRIu64" %s", num, ByLabel(attributes, values).c_str());
+ label.Format("%"PRIu64" %s", num, title.c_str());
return label;
}
@@ -602,7 +608,8 @@ map<SortBy, Fields> fillSortingFields()
sortingFields[SortByEpisodeNumber].insert(FieldSeason);
sortingFields[SortByEpisodeNumber].insert(FieldEpisodeNumberSpecialSort);
sortingFields[SortByEpisodeNumber].insert(FieldSeasonSpecialSort);
- sortingFields[SortByEpisodeNumber].insert(FieldFilename);
+ sortingFields[SortByEpisodeNumber].insert(FieldTitle);
+ sortingFields[SortByEpisodeNumber].insert(FieldSortTitle);
sortingFields[SortBySeason].insert(FieldSeason);
sortingFields[SortByNumberOfEpisodes].insert(FieldNumberOfEpisodes);
sortingFields[SortByNumberOfWatchedEpisodes].insert(FieldNumberOfWatchedEpisodes);
Please sign in to comment.
Something went wrong with that request. Please try again.