command line way of updating library?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
mudboy Offline
Junior Member
Posts: 10
Joined: Aug 2008
Reputation: 0
Post: #1
I have a bunch of scripts that do file downloading, renaming, transcoding, etc for me and I'd love a method of including a line at the end that can trigger a "Update Library" function in XBMC.

I'm running both my scripts and xbmc on linux (although different machines), but i can call a remote command via ssh without a problem in a script.

at the very least its something i can run in cron. Sure, hitting update library is easy, but the wife is constantly complaining when she can't see that a show/movie that she knows we have isn't "there".

Thanks,
mudboy
find quote
malloc Offline
Team-XBMC Developer
Posts: 1,062
Joined: May 2004
Reputation: 0
Post: #2
there's an ftp command on the xbox that can do this. ftp isn't supported on linux, but perhaps there's an equivalent http command or pyhton command. in the case of python you could use http to run the python script within xbmc.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Vaslav Offline
Junior Member
Posts: 7
Joined: Oct 2008
Reputation: 0
Post: #3
I'd like to second this request. A signal handler would be really convenient!
find quote
d4rk Offline
Team-XBMC Developer
Posts: 499
Joined: May 2007
Reputation: 1
Location: Albuquerque
Post: #4
You should be able to do a "ExecBuiltIn(function)" with "XBMC.updatelibrary(database)" as the function (with HTTP API). Check out these 2 links:

http://wiki.xbmc.org/?title=WebServerHTT...n_commands
http://wiki.xbmc.org/?title=List_of_Built_In_Functions

Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


[Image: badge.gif]
find quote
jking2100 Offline
Junior Member
Posts: 23
Joined: Sep 2008
Reputation: 0
Post: #5
Thanks for directing to the proper location I thought I had read about the built-in command but must have skimmed over that second link.

JKing
find quote
Vaslav Offline
Junior Member
Posts: 7
Joined: Oct 2008
Reputation: 0
Post: #6
Thanks!

For reference, this works great in scripts:

Code:
curl 'http://xbmc:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)'
find quote
Bommy Offline
Junior Member
Posts: 38
Joined: Oct 2004
Reputation: 0
Post: #7
Oops, wrong forum.
(This post was last modified: 2010-10-03 21:33 by Bommy.)
find quote