[WINDOWS] HOW-TO schedule automatic library updates

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
phillipah Offline
Junior Member
Posts: 3
Joined: Nov 2011
Reputation: 0
Post: #21
Something I did was put this in a CMD script and have it run after you move your video to the right folder. In my case I have everything automated. Files get downloaded and then post processing happens and I included these 2 lines in that script.

You dont have to AutoIt to achieve the same thing.

Code:
"C:\Program Files\GnuWin32\bin\wget.exe" http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video))
del "xbmcHttp@command=ExecBuiltIn(UpdateLibrary(video))"
find quote
demori Offline
Junior Member
Posts: 5
Joined: Dec 2012
Reputation: 0
Post: #22
If anyone else has been using this on their HTPC for so long that they forgot about it, here's the deal.
It no longer works with Frodo. The old HTTP API has been deprecated. You can update your script to something equally simple/strange by:

1. Downloading curl.exe. (For this example I put it at the C:\ root directory.)
2. Replace the autoIt au3 code with
Code:
;OLD HTTP API
;Run("E:\XBMC Mod Files\wget.exe http://xbmc:password@localhost:8081/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video))", "", "")

;NEW JSON API
Run("C:\curl.exe -H ""Content-Type: application/json"" -X POST http://xbmc:password@localhost:8081/jsonrpc -d ""{\""jsonrpc\"": \""2.0\"", \""method\"": \""VideoLibrary.Scan\"", \""params\"": { \""directory\"": \""\"" }, \""id\"": 1}""")

This can be verified via the XBMC JSON RPC Documentation where there are calls to do much more than just re-scan the video library.

Cheers.
find quote
Post Reply