2012-05-11, 12:11
I've been looking into json-rpc because I need to make a script that will a) update videolibrary b) update videolibrary with a specified file
I know that I can telnet 9090 and write
{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": 1 }
and it will update library, so I would think something like
echo { "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": 1 } > localhost:9090
from a .bat file would do the same, but it doesn't seem to work.
Any idea what is needed for this to work ?
Also if someone could help me with the code needed for it to parse only one spesified file, you know, I want a script that tells xbmc "hey, I added abc.avi to \\medialibrary\avi-files, please add it to your database"
And I want to do this from a windows .bat file or other script file that runs on windows. I would be thankfull for any help, but pls remember, I am no programmer
I know that I can telnet 9090 and write
{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": 1 }
and it will update library, so I would think something like
echo { "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": 1 } > localhost:9090
from a .bat file would do the same, but it doesn't seem to work.
Any idea what is needed for this to work ?
Also if someone could help me with the code needed for it to parse only one spesified file, you know, I want a script that tells xbmc "hey, I added abc.avi to \\medialibrary\avi-files, please add it to your database"
And I want to do this from a windows .bat file or other script file that runs on windows. I would be thankfull for any help, but pls remember, I am no programmer