2011-10-19, 21:51
Montellese Wrote:As I don't have any clue about python coding I'm not sure what you are after. I can only provide help when it comes down to what you can do with jsonrpc and how you can do it best/easiest. Btw beware, the current documentation on the wiki is outdated and many methods have been moved/renamed. I'll try to update it ASAP.
Thanks for taking time montelesse...yes, maybe you can help me interpreting the error message i'm getting while using the JSON-RPC...
My Code:
Code:
import xbmc
AddToPlaylist = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "AudioPlaylist.Add", "id": 1, "params": {"item": {"songid": 7}}}')
if AddToPlaylist["result"] == "OK":
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "AudioPlaylist.SkipNext", "id": 1}')
And the error:
Code:
21:04:09 T:2504 NOTICE: -->Python Interpreter Initialized<--
21:04:09 T:2504 ERROR: Error Type: <type 'exceptions.TypeError'>
21:04:09 T:2504 ERROR: Error Contents: string indices must be integers, not str
21:04:09 T:2504 ERROR: Traceback (most recent call last):
File "C:\Users\max\AppData\Roaming\XBMC\addons\script.playlistenhancer\default.py", line 5, in <module>
if AddToPlaylist["result"] == "OK":
TypeError: string indices must be integers, not str
thanks for your help...
mm