Cron job to tell XBMC to update video library
#1
Question 
Hello all,

I am wondering if there is a way to setup a cron job or something similar that would tell XBMC to scan the video directories for new content and then add new content if it was found?

I realize that this can be set-up to run every time that XBMC starts, but if the system is consonantly on or put in sleep mode, then this is not a valid option.

Thanks
CPU:Intel 2100 3.1 Ghz RAM:Corsair 4 GB DD3-133 Mobo: Gigabyte H67M-D2-B3 mATX OS HDD: Corsair Nova Series 32GB SSD Storage HDD: WD Green 2 TB Video Card: ASUS EN210 SILENT ODD:
Reply
#2
FOund it on the forums I think.

I apologize for this unnecessary post
CPU:Intel 2100 3.1 Ghz RAM:Corsair 4 GB DD3-133 Mobo: Gigabyte H67M-D2-B3 mATX OS HDD: Corsair Nova Series 32GB SSD Storage HDD: WD Green 2 TB Video Card: ASUS EN210 SILENT ODD:
Reply
#3
The cron job is the old way, there's now an autoupdate addon in the repos that works much better. I have one that updates whenever something is added to my movie or tv folder, and one that cleans the library whenever something is deleted.
Reply
#4
(2011-04-07, 22:22)cowfodder Wrote: The cron job is the old way, there's now an autoupdate addon in the repos that works much better. I have one that updates whenever something is added to my movie or tv folder, and one that cleans the library whenever something is deleted.

Where can we find the auto-update addon? I'm running version 11-RC2 and the Update Library feature never works. Whenever I select it, it goes thru the motions of scanning for new content on my video sources, but it never detects anything new. I always have to go into Video > Files, and then right-click each source and scan for new content. That's the only way it works for me, Library Update doesn't do anything. Sad

Thanks!
Reply
#5
FWIW, you could set up XBMC to scan on startup and then add a cron job that runs "shutdown -r now".
Reply
#6
FWIW I still use cron to update and clean my library. I have it scan for new video files every 15 minutes, new music nightly, and I have it clean both libraries nightly.

Code:
*/15    *       *       *       *       /usr/bin/curl 'http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)'
0       1       *       *       *       /usr/bin/curl 'http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.cleanlibrary(video)'
0       3       *       *       *       /usr/bin/curl 'http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(music)'
0       2       *       *       *       /usr/bin/curl 'http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.cleanlibrary(music)'
Reply
#7
You should check out the Library Watchdog service addon. It runs in the background and automatically updates the video library as soon as new files are added. It's only video right now, but I've asked the dev if he can add in the music library as well. http://forum.xbmc.org/showthread.php?tid=128896
Reply

Logout Mark Read Team Forum Stats Members Help
Cron job to tell XBMC to update video library0