Smartplaylists: A potential fix and some cleanup #1098

Merged
merged 2 commits into from Jul 1, 2012

2 participants

@Montellese
Team Kodi member

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.

@Montellese Montellese was assigned Jun 21, 2012
@jmarshallnz
Team Kodi member

Looks OK to me.

Montellese added some commits Jun 21, 2012
@Montellese Montellese smartplaylists: make sure SQL fields have the proper table/view prepe…
…nded

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.
479997d
@Montellese Montellese smartplaylists: cleanup SQL query format cbf291d
@Montellese Montellese merged commit d990e0a into xbmc:master Jul 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment