Videodb split where join order #952

Merged
merged 3 commits into from May 10, 2012

Projects

None yet

3 participants

@jmarshallnz
Member

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?

@Montellese
Member

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.

@jmarshallnz
Member

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.

@jmarshallnz jmarshallnz was assigned May 10, 2012
@jmarshallnz
Member

Confirmed music playlists work with a quick change - will push.

@jmarshallnz jmarshallnz merged commit 1eb2bd3 into xbmc:master May 10, 2012
@arnova
Member
arnova commented on fb4a9c0 May 20, 2012

I think this broke partymode for smartplaylists. I'm getting: http://pastebin.com/nB7z2SdL

Member

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.

Member

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 ;-)

Member

Fixed in 42c6c6f. Thanks for the report.

@dalehamel dalehamel pushed a commit to RasPlex/plex-home-theatre that referenced this pull request Jan 7, 2014
@tru tru Don't play clicks when navigating from the API and video is playing
Fixes #952
c395672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment