Hi,
which class do I need / method do I have to call that the box starts an update of the folders in "album" and writes all new files to the database?
Doing this via browser isn't the best idea, so i thought i'll write me some script that just does the trick via cron and php on the command line.
That would avoid hitting the max execution time ...
Any hints are higly appreciated!
Thanks!
KR,
Grimeton
Comments
If you want to code that you would use the album->getImages() method. Suggest you review the object model for answers to this kind of question.
If you want the images "cached" as well you would have to invoke the cacheImage function with the appropriate parameters for the size/use you wish cached.
But really, why would you want to do this? Is it the case that you will be constantly uploading lots of images? Using the browser works quite well, and if the count of images is so large that you do get the script timeout, just restart. Discovery happens only once. Seems really not worth the effort to make a cron job.
doing it via Browser and restarting, or something else, isn't the best idea IMHO.
I'm talking about 10 years of images which are about 2.2 MILLION images...
They're all stored on a Synology box (that's how I found this software).
So I want to write a script that runs at night and just updates what has to be updated and does the initial index.
If it can be done by using the getImages method of the album class I'll give that a shot.
Any other hints/ideas?
KR,
Grimeton
You can use the preache functions available on the backend. But that will surely block you server a while with 2.2 million images, especially if these might be hires..
Also note that precaching will not help you if you use a theme that defines custom image sizes and overrides the main options.