[REQUEST] Auto Update Library Script?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
boyofford Offline
Member
Posts: 61
Joined: Apr 2009
Reputation: 0
Lightbulb  [REQUEST] Auto Update Library Script? Post: #1
Hi all,
At the moment if i want to add stuff to the library i can see two methods..
select file/folder and scan content
or
leave the option on that makes xbmc scan for new content on startup

Both work fine, but both i think have disadvantages.

If i have to scan manually sort of speak i have to go out of library mode and scan movies or series folders manually (don't have music so thats not a prob),
then return to library mode and go back to the views i prefer (e.g. all movies sorted by title)

or

f i leave the option on to search for new content on startup it scans on every startup.

However i tend to add stuff in big chunks, i.e might add 10 movies and 10 different episodes once a fortnight in one go, sometimes more often, sometimes less often

My idea is a script that will simply scan all folders that are linked when used.
It would be great if this could able be added to skins as a button or something?
Or just linked into favourites if preferred.

Would this script be possible in XBMC? :confused2:

Thanks all, never tried scripting so may give it a go myself if get chance.
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,234
Joined: Nov 2003
Reputation: 82
Post: #2
uhrr. executebuiltin(updatelibrary(video))

yes. totally doable.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
boyofford Offline
Member
Posts: 61
Joined: Apr 2009
Reputation: 0
Post: #3
spiff Wrote:uhrr. executebuiltin(updatelibrary(video))

yes. totally doable.

Thanks, i'm gona have a go at writing this i think.
Looks just the right size of project for my first go at scriptingBig Grin
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #4
Quote:If i have to scan manually sort of speak i have to go out of library mode and scan movies or series folders manually (don't have music so thats not a prob),
then return to library mode and go back to the views i prefer (e.g. all movies sorted by title)

You don't really have to leave the library to do this.
Inside the library in any view>context menu>update library.

In any case unless you want it to be smarter about when it scans, scripting is unnecessary.

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
find quote
boyofford Offline
Member
Posts: 61
Joined: Apr 2009
Reputation: 0
Post: #5
rwparris2 Wrote:You don't really have to leave the library to do this.
Inside the library in any view>context menu>update library.

In any case unless you want it to be smarter about when it scans, scripting is unnecessary.


Your right! problem solved, not spotted that.
Would be good to just update everything from home screen/fav screen, but won't bug me as much now!
find quote
tetodbs Offline
Junior Member
Posts: 46
Joined: Jan 2010
Reputation: 0
Post: #6
Hi to all,

I've upgraded my xbmc to latest svn, before that I've used two scripts to auto update my library but now seems not to work.

The scripts are in "C:\Program Files (x86)\XBMC\scripts" folder and are the following:

autoexec.py
Code:
import xbmc, xbmcgui

xbmc.executebuiltin('XBMC.AlarmClock( VideoLibraryUpdater, XBMC.RunScript(special://home/scripts/VideoLibraryUpdater.py),45,true)')

VideoLibraryUpdater.py
Code:
import xbmc, xbmcgui
xbmc.executebuiltin('XBMC.UpdateLibrary(video)')
xbmc.executebuiltin('XBMC.AlarmClock( VideoLibraryUpdater, XBMC.RunScript(special://home/scripts/VideoLibraryUpdater.py),45,true)')

I found the scripts in this post, how can I make these to work with the new addon system?

Thanks and sorry for my englishRolleyes
find quote
Ilia Offline
Senior Member
Posts: 285
Joined: Dec 2008
Reputation: 0
Post: #7
I am interested in this as well,

I have put all that in a skin.autoupdater format with addon.xml, but unsure how special:// path relates to it or if can be made auto-executable?

Cheers,
find quote
TerranQ Offline
Senior Member
Posts: 292
Joined: Oct 2008
Reputation: 0
Post: #8
I'm just taking a guess here, but they should be in a script.autoupdater folder (I believe), and the name should be changed to default.py (again, I believe). Someone with some knowledge should be able to tell you for sure though.
find quote
Ilia Offline
Senior Member
Posts: 285
Joined: Dec 2008
Reputation: 0
Post: #9
Yep, had changed it into the script.* standard and have addon.xml file too.

I have 2 issues;

1. what will the new path be from "special://home/scripts/VideoLibraryUpdater.py"
2. how can I make the script auto-execute as before. making it default.py means i have to start it every time - deal breaker.

Thanks
find quote
Ilia Offline
Senior Member
Posts: 285
Joined: Dec 2008
Reputation: 0
Post: #10
anyone? I doubt I am the only user that wants an automatic way of updating the library.. Rolleyes
find quote
Post Reply