xbmc/xbmc — pull request #653 by Montellese (2012-01-23 10:20:24+00:00)
Title: fix movies being part of a 1-movie-set being listed multiple times

There were reports on the forum that with the latest tmdb scraper there was an issue with movies showing up multiple times in the video library. The reporter (and vdrfan) tracked it down to it only happening for movies which are part of multiple sets in which there is only this one movie. The problem is not really with the tmdb scraper, it already existed before, but as the new tmdb scraper also scrapes movie sets by default, the problem is forced to appear.

The problem lies in the CREATE VIEW query for the movieview where the movies table is joined with the setlinkmovie table and it doesn't care how the particular sets look like. vdrfan and I came up with the "GROUP BY movie.idMovie" solution and it works perfectly fine on my test installation.