2015-01-26, 17:58
(2015-01-26, 11:52)Frozin Wrote: I'll ask again hopefully someone will be kind enough to help me out.All i want are the commands to update the music library and pull all artwork so I can create a cron expression that would run every day or two. Could someone please help me with what the command is to update the cdart manager library and pull all the art.
I'd use the scheduler by the same developer but unfortunately it doesn't work.
Sorry Frozin, I'm short of time atm.
Here's your starting point: I suppose you are on linux? Use curl and the jsonrpc-API, Kodi must be running with Webserver enabled of course, use the IP and Port of your installation... check "man curl" if you use password protection of the webserver etc.
Update the db ("wait" doesn't work as the plugin forks to the background I think, so make sure to wait for the update to finish)
Code:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "id": 1, "params": { "addonid": "script.cdartmanager", "wait": true, "params": ["update"] }}' http://127.0.0.1:80/jsonrpc
Download all art
Code:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "id": 2, "params": { "addonid": "script.cdartmanager", "wait": true, "params": ["autoall"] }}' http://127.0.0.1:80/jsonrpc
Available parameters: "autocdart", "autocover", "autofanart", "autologo", "autothumb", "autobanner", "autoall", "update"