How to Update Library from a remote macine
#1
so I use various scripts to manage my files, then I update my library via the last line of my script, with below command in my bash script, or terminal.

Code:
curl "http://192.168.1.12/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video,nfs://192.168.1.1/mnt/3tb/tv-series))"

if I run this in the terminal it gives me this result (signaling to me that it worked) but does not update, I have to update manually in xbmc

Code:
me@mygnu~$ curl "http://192.168.1.12/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video,nfs://192.168.1.1/mnt/3tb/tv-series))"
<html>
<li>OK
</html>

this used to work and actually update my library(not just say .ok.), but since I updated to OpenELEC 2.0 ( XBMC V11 - Eden)

I know I read about http api being depreciated, but I cannot find any documentation on the "new way" todo this.
I would like an updated list of terminal commands

thanks dreadycarpenter





Reply
#2
I just today got a working json command today after a couple weeks searching so I understand why you couldn't find anything. Here is the script I made that succesfully works on nightlies. I found a working json command to send youtube links to the plugin then modified it to do the library.

#!/bin/bash

USERNAME=xbmc
PASSWORD=xbmc
SERVER=192.168.1.118
PORT=8080

wget --user=$USERNAME --password=$PASSWORD --delete-after --header='Content-Type: application/json' --post-data='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan"}' http://$SERVER:$PORT/jsonrpc
Reply
#3
Thank you very much shadow for that script, now I don't have to make one myself :-) This is great for automatically updating the library after some TV show has been downloaded with e.g. Flexget.
Reply
#4
thank you this works perfect, I also use as a post script for flexget & transmission both running on my pogoplug (ArchLinuxArm), while xbmc running on openelec box Wink

how about just updating a specific directory?
I used to use this
Code:
curl "http://192.168.1.12/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video,'nfs://192.168.1.1/mnt/3tb/tv-series/South%20Park'))"
Reply
#5
bump....
Reply
#6
@dreadycarpenter: http://wiki.xbmc.org/index.php?title=JSO...brary.Scan

There is a "directory" parameter which can be passed to the command.
Reply

Logout Mark Read Team Forum Stats Members Help
How to Update Library from a remote macine0