• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 8
[REQUEST] Auto Update Library Script?
#16
I got the latest build of xbmc on macos and it works fine, my oldish build (30K+) on appletv also works, so not sure there... maybe a win user can help you, if u do start it manually it will kick it off and continue updating - might be a solution until someone else can show u a better one...Sad
Reply
#17
MacMini running the latest build of XBMC and although "Scan for Library in background" is selected, I'm not sure it works.

I want to run the MacMini in the living room to automatically refresh every x minutes and I want to set it up as pain free as possible since it's my parents who will use it.

I looked around but I can't see how to get it done. I'm not very technical.... intermediate I guess so any help would be great.. I heard it would be done within launchd but... I'm sort of lost.

Thanks!
Reply
#18
minel Wrote:MacMini running the latest build of XBMC and although "Scan for Library in background" is selected, I'm not sure it works.

I want to run the MacMini in the living room to automatically refresh every x minutes and I want to set it up as pain free as possible since it's my parents who will use it.

I looked around but I can't see how to get it done. I'm not very technical.... intermediate I guess so any help would be great.. I heard it would be done within launchd but... I'm sort of lost.

Thanks!

Just follow my instructions to get it working as an "addon" script for the new Dharma XBMC. For the current stable release u will need to follow the first post instructions.. there is no other simple/simpler way that I know off.

Scan for Library in background - is NOT a automatic update, it means what it says - it will update the library, once you press update in the background and will not show u that its updating.
Reply
#19
Thanks! I think i got it working. So if i want it to refresh every 15 minutes, I'd change wherever it says 45 to 15?

thanks again!
Reply
#20
minel Wrote:So if i want it to refresh every 15 minutes, I'd change wherever it says 45 to 15?

Yep exactly! Nod
Reply
#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
Reply
#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)
Reply
#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)'
Reply
#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!
Reply
#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.
Reply
#26
My attempt to pack this into addon:
Image

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

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!
Reply
#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.
---------------------------------------------------
Intel NUC Haswell D34010WYK | ATV2 | Logitech Harmony One | Onkyo TX-NR808 Receiver | QNAP 809 | APC Back-UPS RS 550
Reply
#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)
Reply
#29
@grajen3 nice work, will test out on macos and appletv today

Will let you know
Current setup:
Amlogic M3/MX + Linux + BOXiK Skin + Pioneer vsx520 + Dali Lektor 6

Previous setup:
Revo 3700 + flirc + OpenElec nightlies + Quartz + Pioneer vsx520 + Dali Lektor 6
atv1 + Crystalbuntu + XBMC nightly + xperience1080
Reply
#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:
Amlogic M3/MX + Linux + BOXiK Skin + Pioneer vsx520 + Dali Lektor 6

Previous setup:
Revo 3700 + flirc + OpenElec nightlies + Quartz + Pioneer vsx520 + Dali Lektor 6
atv1 + Crystalbuntu + XBMC nightly + xperience1080
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 8

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