RuudBurger/CouchPotatoServer — pull request #1237 by ikkemaniac (2013-01-06 20:22:46+00:00)
Title: add XBMC v11 Eden notifications support

This is my approach on working with Eden, maybe a little late since Frodo is almost released, but better late then never. Tested with Eden and Frodo.

- First detect the JSON-RPC version XBMC is running (once per boot of CouchPotatoServer on the first notification, except for sending test message then the JSON version is always checked).
- Set a variable indicating whether or not to use JSON (or normal http).
- If JSON should be used, proceed as before this commit.
- If normal-http should be used, use 'notifyXBMCnoJSON' func
- 'notifyXBMCnoJSON' just opens a specific XBMC api url, unfortunately importing urllib for this was necessary to escape the message strings.

TODO: support multiple XBMC hosts, right now the last host in the hosts array will set the 'useJSONnotifications' var.

Conflicts:

couchpotato/core/notifications/xbmc/main.py