xbmc/xbmc — pull request #3708 by Montellese (2013-11-25 15:20:05+00:00)
Title: videodb: better support for sources being temporarily offline during a library clean

This implements basic support for video sources which are temporarily offline during a library clean. The idea is to check the parent path of a missing file (e.g. /home/user/movies for /home/user/movies/The Avengers/The Avengers.mkv) and if that directly is also missing, show a dialog asking the user whether he/she wants to remove all the media items from that directory. The available options are "Keep" and "Remove" where
* "Keep" will keep all the non-existing files belonging to that parent path
* "Remove" will remove all the non-existing files belonging to that parent path
There is an interactive mode (if the user manually started the library clean) and a non-interactive mode where for every hypothetical interaction the choice "Keep" is assumed.

We need to come up with a better text for "What would you like to do with media items from the following unavailable source?" as that string is too long and doesn't fit into the dialog. One line is required for the path not being available.

An improvement to this would be to allow the user to specify that a specific source path (e.g. an USB device) might be offline at some point which could improve the non-interactive mode choices.

This PR also contains a cosmetic commit and an improvement commit for some SQL queries in CVideoDatabase::CleanDatabase(). Furthermore this PR relies on #3698 (first commit).