xbmc/xbmc — pull request #2311 by Montellese (2013-02-25 22:07:14+00:00)
Title: video library: fix handling of watched episode count in custom tvshow nodes

This fixes http://trac.xbmc.org/ticket/14097. The problem is that for custom tvshow nodes, the number of available episodes isn't properly updated when changing the watched filter. The reason for this is that the CFileItemList instance that we pass to GetFilteredItems() does not have m_content set and that CGUIWindowVideoNav::ApplyWatchedFilter() is missing the logic to handle custom video nodes (but the logic for smartplaylists is there).

To make sure m_content is set, I copy all the properties of the original CFileItemList in CGUIMediaWindow into the list to be filtered and pass it on to GetFilteredItems() which also calls CGUIWindowVideoNav::ApplyWatchedFilter(). There I extended the smartplaylist tvshow handling logic to also apply for custom video nodes (which is basically a smartplaylist but not recognised as such by CFileItem::IsSmartPlaylist() because of the different file path).