[REQUEST] Auto Update Library Script? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: [REQUEST] Auto Update Library Script? (/showthread.php?tid=58088) |
[REQUEST] Auto Update Library Script? - boyofford - 2009-09-17 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. - spiff - 2009-09-17 uhrr. executebuiltin(updatelibrary(video)) yes. totally doable. - boyofford - 2009-09-17 spiff Wrote:uhrr. executebuiltin(updatelibrary(video)) Thanks, i'm gona have a go at writing this i think. Looks just the right size of project for my first go at scripting - rwparris2 - 2009-09-17 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), 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. - boyofford - 2009-09-17 rwparris2 Wrote:You don't really have to leave the library to do this. 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! Auto update library - tetodbs - 2010-07-06 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 VideoLibraryUpdater.py Code: import xbmc, xbmcgui I found the scripts in this post, how can I make these to work with the new addon system? Thanks and sorry for my english - Ilia - 2010-07-06 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, - TerranQ - 2010-07-06 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. - Ilia - 2010-07-07 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 - Ilia - 2010-07-07 anyone? I doubt I am the only user that wants an automatic way of updating the library.. - tetodbs - 2010-07-07 Ilia Wrote:anyone? I doubt I am the only user that wants an automatic way of updating the library.. No, you're not the only, please help us!!! - TerranQ - 2010-07-09 I'm an idiot at this stuff, but I don't think you need the special://path anymore. So Code: XBMC.RunScript(special://home/scripts/VideoLibraryUpdater.py) is now just XBMC.RunScript(script.foo), or something similar to that I think - Ilia - 2010-07-09 I got it working, here are the steps: 1. create a file called autoexec.py under xbmc/scripts/ PHP Code: import time, os 2. create 3 files with this content under xbmc/addons/script.au (au = autoupdate) addon.xml PHP Code: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> default.py PHP Code: import xbmc, xbmcgui, os VideoLibraryUpdater.py PHP Code: import xbmc, xbmcgui, os Restart/Start xbmc and you should see Auto Updater in your list of addons/scripts - the script will also start on xbmc boot. Thats it. Now the reason I created a "proper" script is that you can cancel the AlarmClock when you go to the addons/script and select the Auto Updater in xbmc. Now,since I am a noob at python and xbmc scripting in general - I would love this to be cleaned up (possibly providing some settings screen) built into xbmc like recentlyupdated script for movies, so users can auto update they library! enjoy! Ilia - tetodbs - 2010-07-09 Great Ilia, I'll try it asap. Thanks for your support - tetodbs - 2010-07-09 Ok, I created the folder scripts inside xbmc install folder ("C:\Program Files (x86)\XBMC\scripts") and putted inside the autoexec.py, I created the folder script.au inside the addon folder and putted inside the other two files, but seems that the autoexec.py isn't starting, if I manully start the script the library is updating, if not nothing happens!!! Any idea Thanks |