[REQUEST] Auto Update Library Script?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tetodbs Offline
Junior Member
Posts: 46
Joined: Jan 2010
Reputation: 0
Post: #21
After trying several times this is the autoexec.py that work with windows:

PHP Code:
import timeos

time
.sleep(5)
xbmc.executebuiltin("XBMC.RunScript(special://xbmc/addons/script.au/default.py,-startup)" 

I think it will be ok for all platforms Big Grin
find quote
joshrizzo Offline
Junior Member
Posts: 21
Joined: Aug 2010
Reputation: 0
Post: #22
autorun this script at startup:

import threading, thread, time

class update:
def __init__(self):
self.busy = 1
xbmc.executebuiltin("xbmc.updatelibrary(video)")
subThread = threading.Thread(target=self.SubthreadProc, args=())
subThread.start()

def SubthreadProc(self):
if self.busy:
self.busy = 0

while 1:
w = update()
del w
time.sleep(43200)
find quote
chmouel Offline
Junior Member
Posts: 3
Joined: Nov 2009
Reputation: 0
Post: #23
or if you install xbmc-send (in the eventsclients stuff package) you can do something like this :

xbmc-send --host=HOST --action='XBMC.updatelibrary(video)'
find quote
Fabninja Offline
Junior Member
Posts: 7
Joined: Dec 2008
Reputation: 0
Post: #24
tetodbs, I tried your autoexec.py script on Windows 7 x64 with no luck. The autoupdate script works, because I can enable it in XBMC and see that it works. Any tips on getting it to work? Thanks!
find quote
mwthrane Offline
Junior Member
Posts: 13
Joined: May 2010
Reputation: 0
Post: #25
Hello!

Thank you for writing this great script.

But I do have some trouble getting it working. I have made the files needed as listed in post #8. But I did have to create the script and and scripts.au folder myself, I'm not sure if this means anything.

I have see the "AUTO UPDATE" under scripts in XBMC and if i click it it says alarm clock canceled.

But the script doesn't update my library.

I have also tried the autoexec.py in post #16, but I can't get that working either.

I'm using Windows 7 x64 and beta 1 dharma.

Thanks in advance.
(This post was last modified: 2010-09-13 20:17 by mwthrane.)
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #26
My attempt to pack this into addon:
[Image: info.jpg]

Here's feature list
  • Autocreating autoexec.py if such doesn't exist or if it exist add command to launch the script in autoexec
  • Updating video and/or music library
  • Cleaning video and/or music library
  • Settings:
    [Image: cfg.jpg]

Place it in addons folder or anywhere and use settings -> addons -> install from zip
Download

I hope to get feedback from You, as I tested it only on my machine!
find quote
alex84 Offline
Senior Member
Posts: 177
Joined: Jan 2010
Reputation: 2
Location: Sweden
Post: #27
Looks wery nice. May i ask if the user can select
Update video library & Clean video library at the same time.
And also run when xbmc starts button, i only want to do the update and cleaning when booting my computer.

---------------------------------------------------
ASRock 330HT Running XBMC 11 | ATV2 | Logitech Harmony One | Onkyo TX-NR808 Receiver | QNAP 809 | APC Back-UPS RS 550
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #28
alex84 Wrote:Looks wery nice. May i ask if the user can select
Update video library & Clean video library at the same time.
And also run when xbmc starts button, i only want to do the update and cleaning when booting my computer.
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)
(This post was last modified: 2010-09-16 17:05 by pieh.)
find quote
Ilia Offline
Senior Member
Posts: 296
Joined: Dec 2008
Reputation: 0
Post: #29
@grajen3 nice work, will test out on macos and appletv today

Will let you know

Current setup: Revo 3700 + flirc + OpenElec nightlies + Quartz + Pioneer vsx520 + Dali Lektor 6

Previous setup: atv + Crystalbuntu + XBMC nightly + xperience1080
find quote
Ilia Offline
Senior Member
Posts: 296
Joined: Dec 2008
Reputation: 0
Post: #30
can confirm that it works on mac os + dharma beta 2, should be all good on apple tv too :>

@grajen3 - ur awesome man!

Ilia

Current setup: Revo 3700 + flirc + OpenElec nightlies + Quartz + Pioneer vsx520 + Dali Lektor 6

Previous setup: atv + Crystalbuntu + XBMC nightly + xperience1080
find quote
Post Reply