[REQUEST] Auto Update Library Script?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
takoi Offline
Fan
Posts: 506
Joined: Oct 2009
Reputation: 6
Location: Norway
Post: #31
Maybe i should have mentioned this here, but i already made a script 2 weeks ago using callback, so no need for polling and waiting an hour for update. The scan/cleaning is instantaneous. Also features autostart. Linux only tho..

Im sill waiting for a python module so you'll have to apply this patch: http://trac.xbmc.org/ticket/10046
Addon here: http://github.com/takoi/xbmc-autoupdater-addon
(This post was last modified: 2010-09-17 14:56 by takoi.)
find quote
pieh Offline
Team-XBMC Member
Posts: 664
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #32
ventech Wrote:Maybe i should have mentioned this here, but i already made a script 2 weeks ago using callback, so no need for polling and waiting an hour for update. The scan/cleaning is instantaneous. Also features autostart. Linux only tho..

Im sill waiting for a python module so you'll have to apply this patch: http://trac.xbmc.org/ticket/10046
Addon here: http://github.com/takoi/xbmc-autoupdater-addon
this is great, too bad it is for linux only now - i'll take a look on that python module and check if I add windows code there. some mac user could use do it for mac.

About addon itself, It looks nice - my suggestion add also support for music library. And another hint:
Code:
xbmc.executebuiltin("UpdateLibrary(video)")
forces to scan all video sources but if You would use xbmc.executebuiltin("UpdateLibrary(video, path)") this would scan only path where actual file system change has occured.
find quote
takoi Offline
Fan
Posts: 506
Joined: Oct 2009
Reputation: 6
Location: Norway
Post: #33
Its using inotify, which is linux only. But if you know any windows/mac equivalence then sure, they can be added.
If not then you'll just have to wait for support for multiple programming languages (currently being worked on). Then i can rewrite it and it'll be 100% platform independent using jnotify.

Anyways thanks for suggestion. Im aware of it all and i've planned to add it
find quote
pieh Offline
Team-XBMC Member
Posts: 664
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #34
im aware that inotify is linux stuff, for windows i think i could use ReadDirectoryChangesW and for mac fsevents

but do it so interface of python module is common for all platforms

jnotify would be great, but i guess no one know when multiple programing languages will be featured Smile
find quote
alex84 Offline
Senior Member
Posts: 177
Joined: Jan 2010
Reputation: 2
Location: Sweden
Post: #35
grajen3 Wrote:User can select even all 4 works, but as this is first version this needs some testing - it seems to work fine for me.

if You want update just when You startup XBMC then select settings -> video -> library -> update library on startup and put this:
Code:
<videolibrary>
    <cleanonupdate>true</cleanonupdate>  <!-- default set to false to
  </videolibrary>
in your advancedsettings.xml (check this for more info: http://wiki.xbmc.org/index.php?title=Adv...library.3E)

Ohh nice... That works fine, thx =)

---------------------------------------------------
ASRock 330HT Running XBMC 11 | ATV2 | Logitech Harmony One | Onkyo TX-NR808 Receiver | QNAP 809 | APC Back-UPS RS 550
find quote
Drewdatrip Offline
Member
Posts: 96
Joined: May 2004
Reputation: 0
Post: #36
ventech Wrote:Maybe i should have mentioned this here, but i already made a script 2 weeks ago using callback, so no need for polling and waiting an hour for update. The scan/cleaning is instantaneous. Also features autostart. Linux only tho..

Im sill waiting for a python module so you'll have to apply this patch: http://trac.xbmc.org/ticket/10046
Addon here: http://github.com/takoi/xbmc-autoupdater-addon

awesome to see this up and running!
However i was wondering if you could write abit more explicit instructions on how to get this working
thanks again

Drew
find quote
takoi Offline
Fan
Posts: 506
Joined: Oct 2009
Reputation: 6
Location: Norway
Post: #37
Alt. 1: Download pre-compiled
autoupdater-x86-64-bin.tar.gz
autoupdater-i686-bin.tar.gz

Extract content to ~/.xbmc/addons/



Alt. 2: Compile:
You'll need these packages installed: gcc python2.4 python2.4-dev

1. Download this file and unpack it.

2. Compile it:
Code:
cd auto-updater-addon/pyinotify-0.7.1
Code:
python2.4 setup.py build --build-lib ../script.module.pyinotify/lib/
if everything compiled correctly you now have a _inofity.so file in the script.module.pyinotify/lib directory.

3. Copy script.module.pyinotify and script.autoupdater to ~/.xbmc/addons/

4. Run xbmc and go to system->addons->enabled addons->programs->Auto Updater to configure.

5. Start the script from the Programs menu
(This post was last modified: 2010-09-24 20:03 by takoi.)
find quote
ssy080 Offline
Junior Member
Posts: 5
Joined: Nov 2009
Reputation: 0
Post: #38
Thank you Grajen3 for your wonderful addon!

I am using Beta 2 Dharma on Windows 7 64bit.

1. Your addon is currently not creating the file autoexec.py. I had to manually create this under userdata\

Please fix!

2. Also, my system has trouble immediately connecting to the network after waking from hibernation, thus the library update fails. (my files are on the network) Is there any way of delaying the initial library update at start up, say 5 seconds?

The command of "time.sleep" does not work. I looked at the log and it seems like it is not recognizing the command.

How can I fix this?

3. the clean library function seems to conflict with the update function. The log says "ERROR: XBMC.CleanLibrary is not possible while scanning for media info"

4. Does this addon do library update after wake too? Or maybe do you know of a way to delay the xbmc's native library update at start up?

Thank you!
(This post was last modified: 2010-09-24 04:11 by ssy080.)
find quote
danz0l Offline
Fan
Posts: 628
Joined: Jul 2010
Reputation: 0
Post: #39
ventech Wrote:Sure,

1. Download this file and unpack it.

2. Compile it:
Code:
cd auto-updater-addon
Code:
make
if everything compiled correctly you now have a _inofity.so file in the script.module.pyinotify/lib directory.

3. Copy script.module.pyinotify and script.autoupdater to ~/.xbmc/addons/

4. Run xbmc and go to system->addons->enabled addons->programs->Auto Updater to configure.

5. Start the script from the Programs menu

Didn't work for me Sad

make

Quote:Makefile:27: ../../../Makefile.include: No such file or directory
make: *** No rule to make target `../../../Makefile.include'. Stop.

-= My Media Centre =-
ACER Revo R3610 | x2 1.5TB WD Caviar Green SATA Hard Drives (WD15EADS) | x2 2.0TB WD Caviar Green SATA Hard Drive ( WD15EARS ) | 3.5in Black eSATA USB Trayless SATA External Hard Drive Enclosure | Emprex 3009URF Wireless MCE Remote Control | XBMCLive Dharma Beta1
find quote
takoi Offline
Fan
Posts: 506
Joined: Oct 2009
Reputation: 6
Location: Norway
Post: #40
danz0l Wrote:Didn't work for me Sad

make
Yeah, i see what i did there. Stupid me. OP updated.

Just do this instead:
Code:
cd auto-updater-addon/pyinotify-0.7.1
Code:
python2.4 setup.py build --build-lib ../script.module.pyinotify/lib/
find quote
Post Reply