xbmc/xbmc — pull request #5170 by jmarshallnz (2014-08-07 09:46:59+00:00)
Title: Finer grained updates of video database

Here's a simplified version of #4301 that basically only touches the link tables when updating a movie if the link tables need altering.

Note that I have not done extensive (read any) testing. @MilhouseVH I believe you have an 'easy' way to test this out?

The UpdateLinkTable functions make some assumptions about the link table setup naming, which is correct for the ones I'm using now, but as if we wish to extend to music videos, we'll need to add another param, as the musicvideo table uses idMVideo instead of idMusicVideo. Though, a better plan might be to just fix up that inconsistency, which is worked around in other places.

The tag link table is also different ofc. At some point we might want to look at unifying the link tables to this format, at the same time ensuring we have the same naming pattern where possible. Obviously the actors table is one we can't incorporate using the same functionality, however.

Assuming this is acceptable, I'll look at extending to shows, episodes and music videos.

One other thing @cg110 had that I don't here is that once things are sped up, the notification firing from JSON-RPC to refresh the UI is then problematic. An idea to fix that is to add a delay to it - not sure how easy that would be - no doubt we have some "delay this function" code somewhere...