paolobenve / myphotoshare

MOVED TO GITLAB! --- A Web 2.0 Photo Gallery Done Right via Static JSON, Dynamic Javascript and a bit of php for sharing
15 stars 0 forks source link

do not generate nor save virtual albums if not needed #97

Closed paolobenve closed 6 years ago

paolobenve commented 6 years ago

Since virtual albums could be very big, it seems better to compare the internally generated album with the saved one before saving it, possibly a big amount of time can be saved

paolobenve commented 6 years ago

no, we can simply check whether there is a change in the albums, if no change do not save the virtual albums

paolobenve commented 6 years ago

hmmmm... it's absolutely no simple to check whether the albums tree has changed, closing

paolobenve commented 6 years ago

Perhaps we could follow https://stackoverflow.com/questions/29685069/get-the-last-modified-date-of-a-directory-including-subdirectories-using-pytho#29685234 and once for all check if the last modified date of the tree is more recent than options.json modified date.

If the tree is older than options.json, we could avoid scanning the tree.

However, images with gps data added could not be detected, if they have their modified date unchanged...

paolobenve commented 6 years ago

However, images with gps data added could not be detected, if they have their modified date unchanged...

no, the dir modification time is changed, so it seems to be safe

paolobenve commented 6 years ago

We must be sure that json files, thumbnails and reductions need no refresh, too

paolobenve commented 6 years ago

The only thing we could care of is that, if neither avconv nor ffmpeg are installed and one of them is subsequently installed, videos would not detected.

But the installation is supposed to be complete, so closing