Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix episode sorting after filtering #1288

Merged
merged 1 commit into from

2 participants

@Voyager1
Collaborator

This is a small bugfix for the issue reported here:
http://forum.xbmc.org/showthread.php?tid=135982&pid=1169047#pid1169047

essentially, when you are filtering watched/unwatched episodes, the episode attribute is dynamically changed. Upon (re)display of the list, the code wants to sort the list on the episode (count) attribute, but in some cases it doesn't resort. It seems that the root cause is that the sortmethod or the sortorder don't change, and the list sorting method is bypassed, which is incorrect in this case.

Potentially, there can be other situations like this, but the application & gui reload the lists from the database in these cases (e.g. ignoring 'the' etc.).

@jmarshallnz
Owner

Thanks :)

@jmarshallnz jmarshallnz merged commit e40b9ba into xbmc:master
@Voyager1 Voyager1 deleted the Voyager1:fix-episode-sorting branch
@LongChair LongChair referenced this pull request from a commit in plexinc/plex-home-theater-public
@LongChair LongChair Fix PQ Edit mode weirdness #1288 Issue 1 80027d8
@LongChair LongChair referenced this pull request from a commit in plexinc/plex-home-theater-public
@LongChair LongChair Fix PQ Edit mode weirdness #1288 Issue 2
Its not completely ideal in terms of refresh, but as long as moving across rows of listviews can only be done using selection change, i'm not sure how we can make it better.
2acb51b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 14, 2012
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 xbmc/video/windows/GUIWindowVideoNav.cpp
View
5 xbmc/video/windows/GUIWindowVideoNav.cpp
@@ -1619,9 +1619,12 @@ bool CGUIWindowVideoNav::ApplyWatchedFilter(CFileItemList &items)
}
if(node == NODE_TYPE_TITLE_TVSHOWS || node == NODE_TYPE_SEASONS)
+ {
// the watched filter may change the "numepisodes" property which is reflected in the TV_SHOWS and SEASONS nodes
// therefore, the items labels have to be refreshed, and possibly the list needs resorting as well.
- FormatAndSort(items);
+ items.ClearSortState(); // this is needed to force resorting even if sort method did not change
+ FormatAndSort(items);
+ }
return listchanged;
}
Something went wrong with that request. Please try again.