This splits the join/where and order clauses passed to the videodb Get*ByWhere() functions.
The idea behind it is so that the WHERE clause is always consistent - i.e. WHERE is added by the Get*ByWhere() functions, not by anything else. This is needed for set fetching as we need to combine multiple where clauses.
I'm not sure about the last commit - while wrapping each of these in () doesn't break anything, I'm not sure if they're all required. @Montellese?
Looking good. Much cleaner than my approach with different parameters for where, join and order. Theoretically if we are already at it we could also cover ORDER BY (and maybe LIMIT) but this should be enough to fix the known bug(s).
Concerning the last commit, the () are only really necessary where you manually append a partial WHERE clause to the one passed in through the filter but IMO it doesn't hurt to have them in the other places as well. We never know when we'll have to extend those and then we might run into the same problems again.
Yeah, I was thinking about doing ORDER BY but figured I'd leave it simple for now.
Need to check music smartplaylists I think, but otherwise should be good to go - thanks for looking over it.
introduce Filter class so as to break up joins/where/order in a nicer…
… way for the videodb
Confirmed music playlists work with a quick change - will push.
remove WHERE from Filter::where and append where they're actually use…
…d in Get*ByWhere()
fix: surround where clause for sets in () else any AND clauses may ch…
…ange its meaning
I think this broke partymode for smartplaylists. I'm getting: http://pastebin.com/nB7z2SdL
What exactly do you mean with "partymode for smartplaylists" (sorry I never used partymode). When I go to Music -> Library -> Playlists -> Party mode playlist and specify an empty filter (i.e. all songs) it works fine for me.
Indeed, that works fine. But if you try to do "Play in partymode" (from the context menu) on a partymode playlist (xsp) in eg. the Music libraries's playlists-node, it fails.
ps. You should really try them, they're quite handy ;-)
Fixed in 42c6c6f. Thanks for the report.
Don't play clicks when navigating from the API and video is playing