XBMC Library Updater

Come up with a useful post-processing script? Share it here!
tbird2340
Newbie
Newbie
Posts: 20
Joined: December 19th, 2008, 3:10 pm

Re: XBMC Library Updater

Post by tbird2340 »

Got the following error.. Any help would be great, thanks.

Code: Select all

C:\Program Files\SABnzbd>ftp -s:updatelibrary.scr 
Error opening script file updatelibrary.scr.



Transfers files to and from a computer running an FTP server service

(sometimes called a daemon). Ftp can be used interactively.



FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]



  -v             Suppresses display of remote server responses.

  -n             Suppresses auto-login upon initial connection.

  -i             Turns off interactive prompting during multiple file

                 transfers.

  -d             Enables debugging.

  -g             Disables filename globbing (see GLOB command).

  -s:filename    Specifies a text file containing FTP commands; the

                 commands will automatically run after FTP starts.

  -a             Use any local interface when binding data connection.

  -A             login as anonymous.

  -w:buffersize  Overrides the default transfer buffer size of 4096.

  host           Specifies the host name or IP address of the remote

                 host to connect to.



Notes:

  - mget and mput commands take y/n/q for yes/no/quit.

  - Use Control-C to abort commands.
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

Can you post the script you are using.
tbird2340
Newbie
Newbie
Posts: 20
Joined: December 19th, 2008, 3:10 pm

Re: XBMC Library Updater

Post by tbird2340 »

Sorry, I meant to post back.. The newer releases of XBMC (for windows) don't even have the FTP option..

I actually found another way to accomplish the library update (sickbeard).

Thanks!
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

Thats cool.

Further thru this thread has python scripts that also includes Prowl & XBMC notifications.
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: XBMC Library Updater

Post by roads »

Hi, I am trying to run this script on OSX. I have set up Username and password ans webaccess in the settings of XBMC. Running the script from terminal reports no error but nothing seems to happen and it end really quickly. If i check my XBMC video library. Am I misunderstanding something? Is this only working after a file is processed out of SABNZB? There are new folders in the category directories of SABNZB that XBMC does not have in the lib yet.

Code: Select all

#!/bin/bash
echo "Updating XBMC"
curl --get "http://xbmc:[email protected]:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)" > /dev/null 2>&1
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: XBMC Library Updater

Post by roads »

*cough* so silent here  ;D
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

roads wrote: *cough* so silent here  ;D
I don't do OSX, but did you look at the posts from here -> http://forums.sabnzbd.org/http://forums ... 6697#p6697

Did you chmod +x the script ?

Does http://xbmc:[email protected]:8080/xbm ... ary(video) work if you put it straight into a browser ?
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: XBMC Library Updater

Post by roads »

Thanks for the answer. Yeah the script is executable I just cant set my path to the xbmc command in my localhost so in the browser it does not run. I read the whole thread it’s a script that I really would like to work.

http://localhost:8080/xbmcCmds/xbmcHttp ... 28video%29

gives out
404 Not Found

The path '/xbmcCmds/xbmcHttp' was not found.

Traceback (most recent call last):
  File "cherrypy/_cprequest.pyc", line 618, in respond
  File "cherrypy/_cperror.pyc", line 233, in __call__
NotFound: (404, "The path '/xbmcCmds/xbmcHttp' was not found.")
I cant find that xbmcCmds folder on my Mac.
Last edited by roads on March 9th, 2010, 12:59 am, edited 1 time in total.
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

roads wrote: I just cant set my path to the xbmc command in my localhost so in the browser it does not run
I'm not sure what you mean here. Is XBMC running on the same machine or different ?
Is it the latest version of XBMC ?
Have you tried removing the username and password from XBMC ?
Is port 8080 in use by something else like SAB ? Try another port in XBMC

If you can not get it working with the browser, then the scripts are not going to work either.
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: XBMC Library Updater

Post by roads »

see my edit above I removed the user pass and the script runs on same machine so i took localhost. Yes it’s the latest stable build of XBMC. I am just too dumb to find the directory I guess where the command is.
This is ment to also run on the same machine right?
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

There is no directory for these commands, its all built into the XBMC Web Server HTTP API.
By default SAB uses port 8080, try a different port in XBMC.

and test with a simple command like
http://localhost:[port]/xbmcCmds/xbmcHttp?command=Getvolume() which should return the current volume in the browser window.

Dumb question, but the XBMC Web Server is enabled ?

And yes, they all can run on the same machine, you just need to watch the port numbers.
Last edited by JohnSCS on March 9th, 2010, 1:14 am, edited 1 time in total.
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: XBMC Library Updater

Post by roads »

Yeah http access is set to 8080 in XBMC. A dumb question from me, must XBMC be running for this? I hoped the helper in the background would be enough.
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

XBMC has to be running for the commands to work, but if XBMC is not the active app, then most commands dont work until XBMC becomes the active window.

If you installed SAB with defaults, then you have to change the XBMC port to another number like 8181 and restart XBMC.
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: XBMC Library Updater

Post by roads »

Thanks John that was the probem SAB beeing on the same Port as XBMC. Thanks very much for helping! I thought this would work with XBMC being off. Any possibility to make this happen?

Maybe start it up minimized if not running, update and close it down again if it was not running.

That would be great for people who run xbmc on the same machine as SABNZB.
Last edited by roads on March 9th, 2010, 1:55 am, edited 1 time in total.
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: XBMC Library Updater

Post by JohnSCS »

I know notifications will not come thru if XBMC is minimized (they appear when XBMC is restored), so I assume the same for library updates. Testing will prove this. Starting XBMC minimized may be the answer because XBMC starts the library update itself.

I run SAB & XBMC on the one machine which is dedicated to Home Theatre, and hence runs XBMC 24/7. The other option is just let XBMC do the library update when it starts - slower start up but simpler on shared machines.
Post Reply