xbmc/xbmc — pull request #836 by Montellese (2012-03-31 20:55:02+00:00)
Title: jsonrpc: add FooLibrary.SetFooDetails and VideoLibrary.RemoveFoo

These commits add the probably most requested methods to JSON-RPC and allow a somewhat controlled way of changing stuff in XBMC's databases i.e. without raw SQL queries etc. as a lot of clients still do through our HTTP API.

There are (at least) two "ugly" things in this PR:
- There are no RemoveFoo methods for the AudioLibrary because we don't have any code that does this in CMusicDatabase (if I got some time I might add it but I'm not as familiar with CMusicDatabase as I am with CVideoDatabase).
- VideoLibrary.SetFooDetails needs to manually call SetPlayCount() in case the user sets a new playcount and or lastplayed value. All the other properties can be updated through CVideoDatabase::SetDetailsForFoo()

Getting this in will be a huge step towards getting rid of the deprecated HTTP API. As far as I can tell the only missing other feature is library filter (for which I will present a PR soon (sometime in mid/end of april) as well).