Kodi Community Forum

Full Version: [Bug?] Playlists and Sets with One Movie
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been trying to find a reason for some odd playlist behavior and finally found the reason for it. When XBMC displays the list of movies in the library, it generally pulls all sets with more than one member and then pulls all movies not in sets.

This works well until you run into a playlist with different criteria. I have one that displays newer movies (year greater than 2009) that have not been watched (playCount less than 1). This causes issues with movies in sets if only one movie in the set meets the criteria. In that case, the movie fails to meet the first query (sets with more than one movie) and the second (movies not in sets).

The relevant portion of the log is below:

10:38:25 T:140542719850560 M:794054656   DEBUG: GetSetsNav query: SELECT sets.idSet,sets.strSet,COUNT(1) AS c,count(files.playCount) FROM sets JOIN setlinkmovie ON sets.idSet=setlinkmovie.idSet JOIN movie ON setlinkmovie.idMovie=movie.idMovie JOIN files ON files.idFile=movie.idFile  where movie.idMovie in (select movieview.idMovie from movieview WHERE (c07 > '2009') AND (playCount is NULL or playCount < '1')) GROUP BY sets.idSet HAVING c>1
10:38:25 T:140542719850560 M:794054656   DEBUG: GetMoviesByWhere query: select * from movieview WHERE (c07 > '2009') AND (playCount is NULL or playCount < '1') and movieview.idMovie NOT in (select idMovie from setlinkmovie) ORDER BY c00
Someone just submitted a patch on Trac for this earlier this week, not sure if it's in the nightlies yet.
Thanks for spotting that.