• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8
[REQUEST] Auto Update Library Script?
#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
Reply
#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.
Reply
#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
Reply
#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
Reply
#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 =)
---------------------------------------------------
Intel NUC Haswell D34010WYK | ATV2 | Logitech Harmony One | Onkyo TX-NR808 Receiver | QNAP 809 | APC Back-UPS RS 550
Reply
#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
Reply
#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
Reply
#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!
Reply
#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
Reply
#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/
Reply
#41
ventech Wrote:Sure,

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



ps: if you dont have python2.4 on your system you can just use the one xbmc compiled; like this:
Code:
/home/<path-to-xbmc-src>/xbmc/lib/libPython/Python/python setup.py build --build-lib ../script.module.pyinotify/lib/s:

OK i'm baffled by this. I tried compiling via python but don't have python installed on the xbmclive system.

So i thought, right, i'll use the xbmc compiled one, but i just can't understand that instruction above i'm afraid Sad

I think this one might be a little too complicated to install in its raw form. Is there no way you can package this all up ? Would love to try it. Or does it have to be compiled per system.
-= 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
Reply
#42
I did this, not sure if its going to work or not because I am at work with no way to check

git clone git://github.com/takoi/xbmc-autoupdater-addon.git

I ended up with a folder called xbmc-autoupdater-addon

inside that folder was a folder called script.autoupdater

I copied script.autoupdater to ~/.xbmc/addons/

so now i have the folder script.autoupdater sitting in my addons I guess I'll have to wait until I get home to see if it works.

-=Jason=-

Code:
xbmc@XBMCLive:~$ git clone git://github.com/takoi/xbmc-autoupdater-addon.git
Initialized empty Git repository in /home/xbmc/xbmc-autoupdater-addon/.git/
remote: Counting objects: 52, done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 52 (delta 18), reused 0 (delta 0)
Receiving objects: 100% (52/52), 48.52 KiB, done.
Resolving deltas: 100% (18/18), done.
xbmc@XBMCLive:~$ cp -r xbmc-autoupdater-addon/script.autoupdater/ .xbmc/addons/
xbmc@XBMCLive:~$ ls .xbmc/addons/script.autoupdater/
addon.xml  autoexecHandler.py  changelog  default.py  icon.png  LICENSE  resources
xbmc@XBMCLive:~$
Reply
#43
danz0l Wrote:OK i'm baffled by this. I tried compiling via python but don't have python installed on the xbmclive system.

So i thought, right, i'll use the xbmc compiled one, but i just can't understand that instruction above i'm afraid Sad

I think this one might be a little too complicated to install in its raw form. Is there no way you can package this all up ? Would love to try it. Or does it have to be compiled per system.
Did you compile xbmc yourself? Because then you should have the python binaries in your source folder. If not then you have to install build tools:
sudo apt-get install python2.4
sudo apt-get install gcc

This is the only way; unless of cource you get someone else that uses same architecture as you to compile it for you. Third option; you wait and pray the patch will be included dharma.


@Flomaster:
wont work, because you need the pyinotify module. This is not in the git repo but in the downloads section (see link in original post)
Reply
#44
ventech Wrote:Did you compile xbmc yourself? Because then you should have the python binaries in your source folder. If not then you have to install build tools:
sudo apt-get install python2.4
sudo apt-get install gcc

This is the only way; unless of cource you get someone else that uses same architecture as you to compile it for you. Third option; you wait and pray the patch will be included dharma.


@Flomaster:
wont work, because you need the pyinotify module. This is not in the git repo but in the downloads section (see link in original post)


apt-get didn't work for me I had to
Code:
sudo aptitude install python2.4
but I was presented with

Code:
Couldn't find package "python2.4".  However, the following
packages contain "python2.4" in their name:
  python2.4-gaphas python2.4-dialog python2.4-simpy-gui python2.4-iplib python2.4-sasync python2.4-scikits-openopt python2.4-decoratortools
  python2.4-pyrss2gen python2.4-forgethtml python2.4-simpletal python2.4-simpy python2.4-json python2.4-btsutils python2.4-reverend python2.4-pyvtk
Reply
#45
ventech Wrote:Did you compile xbmc yourself? Because then you should have the python binaries in your source folder. If not then you have to install build tools:
sudo apt-get install python2.4
sudo apt-get install gcc

This is the only way; unless of cource you get someone else that uses same architecture as you to compile it for you. Third option; you wait and pray the patch will be included dharma.


@Flomaster:
wont work, because you need the pyinotify module. This is not in the git repo but in the downloads section (see link in original post)

No installed via xbmclive.

I had previously tried the same as Jason with the git repository and as you said that didn't work.

I'll install python when i get time. Already have all the other build tools i think from compiling downloaddaemon.

Question though, how does this all work ? Will it effect system performance on auto updating ?
-= 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
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
[REQUEST] Auto Update Library Script?1