XBMC Library Updater
Re: XBMC Library Updater
The HTTP API will be fully depreciated in Eden. Should still be working in Dharma. I can't remember my exact version, but it's Live 10.1 and not a nightly build.
Is this a fresh install and have you had the script working in the past?
Is this a fresh install and have you had the script working in the past?
Re: XBMC Library Updater
I haven't used it in the past, I was using xbmc-send before to do updates. This isn't exactly a fresh install but I haven't really tweaked it much since installing it.
I did sort out the jsonrpc script, here it is:
That's pretty much it, you can add in a bit to send a notification when it runs with another jsonrpc call or do pretty much anything.
you need to install the library of course.
I did sort out the jsonrpc script, here it is:
Code: Select all
#!/usr/bin/python
import jsonrpclib
server = jsonrpclib.Server('http://localhost:8080/jsonrpc')
server.VideoLibrary.ScanForContent()
That's pretty much it, you can add in a bit to send a notification when it runs with another jsonrpc call or do pretty much anything.
you need to install the library of course.
Re: XBMC Library Updater
Hi guys,
Trying to get the libary update working on my setup. ATV1 (crystalbuntu [ubuntu 8.04]) and pre eden XBMC. I think the last post from Ashex is for pre eden builds but I just have no idea what to do with it.
I read through the whole thread and cant really figure it out. I think most of the scripts are for win 7 yeah?
Anyway any help would be appreciated.
Thanks
Trying to get the libary update working on my setup. ATV1 (crystalbuntu [ubuntu 8.04]) and pre eden XBMC. I think the last post from Ashex is for pre eden builds but I just have no idea what to do with it.
I read through the whole thread and cant really figure it out. I think most of the scripts are for win 7 yeah?
Anyway any help would be appreciated.
Thanks
Re: XBMC Library Updater
If you want to use my python script, stick it in a file and name it xbmcupdate.py, don't forget to install the python library (look at the link in my previous post).
Grant it execute permissions (chmod +x xbmcupdate.py) then drop it in the scripts folder. Once you have done that you'll need to go in to sabnzbd+ and set that script for post-processing.
Grant it execute permissions (chmod +x xbmcupdate.py) then drop it in the scripts folder. Once you have done that you'll need to go in to sabnzbd+ and set that script for post-processing.
Re: XBMC Library Updater
I don't know if this is your only problem, but if you're using an up to date pre Eden nightly, Ashex code needs to be changed to:jadel wrote:Hi guys,
Trying to get the libary update working on my setup. ATV1 (crystalbuntu [ubuntu 8.04]) and pre eden XBMC. I think the last post from Ashex is for pre eden builds but I just have no idea what to do with it.
I read through the whole thread and cant really figure it out. I think most of the scripts are for win 7 yeah?
Anyway any help would be appreciated.
Thanks
Code: Select all
#!/usr/bin/python
import jsonrpclib
server = jsonrpclib.Server('http://localhost:8080/jsonrpc')
server.VideoLibrary.Scan()
Re: XBMC Library Updater
You can do this without using python classes with just wget:
If you want to see the response, use -O- and add "id": "anything" to the end of the JSON POST data. Tested on Eden 11.0 Beta 1. Also note that my XBMC HTTP server is on port 8000, modify if necessary.
Code: Select all
wget -q -O/dev/null --header='Content-Type: application/json' --post-data='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan"}' http://localhost:8000/jsonrpc
Re: XBMC Library Updater
CapnBry: Thanks for that, works a treat!
Re: XBMC Library Updater
I've tested this using ssh and it works great but I can't get it to work in SABnzbd.CapnBry wrote:You can do this without using python classes with just wget:If you want to see the response, use -O- and add "id": "anything" to the end of the JSON POST data. Tested on Eden 11.0 Beta 1. Also note that my XBMC HTTP server is on port 8000, modify if necessary.Code: Select all
wget -q -O/dev/null --header='Content-Type: application/json' --post-data='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan"}' http://localhost:8000/jsonrpc
I've saved it to the scripts folder as xbmcupdate.py and made sure it's executable but SABnzbd throws up this error -
Code: Select all
Cannot run script /storage/.xbmc/userdata/addon_data/service.downloadmanager.SABnzbd-Suite/scripts/xbmcupdate.py
Re: XBMC Library Updater
It's not python, that's why it won't work. Someone will tell me if I'm wrong, but you probably should save it as a bash script.
Re: XBMC Library Updater
Got there in the end using this -
saved as xbmcupdate.py and made executable.
Code: Select all
#!/usr/bin/python
import urllib
urllib.urlopen("http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video))").close()
Re: XBMC Library Updater
And now it's not working.
Anyone got a script that works for Eden?
Thanks.
Anyone got a script that works for Eden?
Thanks.
Re: XBMC Library Updater
Did beta 2 break it? Does the wget method still work for you?
Re: XBMC Library Updater
I don't know how I should be saving the wget method?
Re: XBMC Library Updater
I'm really rusty on my Linux skills but I think as a .sh file? With a "#!/bin/sh" header.
Re: XBMC Library Updater
It was the header that I didn't have and now it's working.RedsGT wrote:I'm really rusty on my Linux skills but I think as a .sh file? With a "#!/bin/sh" header.
Many thanks.