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.
Looks OK to me.
smartplaylists: make sure SQL fields have the proper table/view prepe…
SQL doesn't always like it if there's e.g. a field idMovie but multiple
tables involved in a query which all contain idMovie. Therefore making
sure it is movieview.idMovie instead of movie solves such possible conflicts.
smartplaylists: cleanup SQL query format