2010-10-01, 16:07
Hi Guys,
Been using this code snippet for ages as part of my post processing script under Sabnzbd on linux for updating & then cleaning the video library after every new TV show download. (Sabnzbd runs on my XBMC HTPC)
In this example 'lee' is my username and note that I run the XBMC webserver on port 8081 so it does not clash with Sabnzbd's own web server component. (Don't forget to change the server IP too to suit your needs.)
I think there is a Windows port of curl so there is no reason why this basic script couldn't be modified to work under windows using curl.
Hope this helps someone out.
Been using this code snippet for ages as part of my post processing script under Sabnzbd on linux for updating & then cleaning the video library after every new TV show download. (Sabnzbd runs on my XBMC HTPC)
Code:
echo "Updating XBMC Video Library..."
/usr/bin/sudo -u lee -H curl 'http://10.0.0.27:8081/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.updatelibrary(video)'
/bin/sleep 30
echo "Cleaning XBMC Video Library..."
/usr/bin/sudo -u lee -H curl 'http://10.0.0.27:8081/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.cleanlibrary(video)'
In this example 'lee' is my username and note that I run the XBMC webserver on port 8081 so it does not clash with Sabnzbd's own web server component. (Don't forget to change the server IP too to suit your needs.)
I think there is a Windows port of curl so there is no reason why this basic script couldn't be modified to work under windows using curl.
Hope this helps someone out.