xbmc/xbmc — pull request #1098 by Montellese (2012-06-21 18:20:14+00:00)
Title: Smartplaylists: A potential fix and some cleanup

The first commit is a potential fix (I actually ran into the problem in one of my other branches for GSoC) in the SQL WHERE clauses put together for smartplaylists. Currently all those WHERE clauses use fields by just their name so e.g. "idMovie" but SQL (or maybe it's just SQLite) doesn't like that if the SQL query contains multiple (joined) tables which have an "idMovie" field. So changes makes sure that all those fields are prepended by the proper table/view (in the case of "idMovie" it would be "movieview.idMovie").

The second commit is just some cleanup to make the rather long and nested queries easier readable.