[synchronization] Sync does not regenerate Previews for changed files (without changing its name) #1023

Open
opened 2026-10-05 00:28:51 +02:00 by adam · 1 comment
Owner

Hello,
I work with galleries in a directory structure. The synchronization happens hourly by script or manually by tools - > Synchronization.

If I now change an image/file without changing its name, the synchronization does not recognize it as changed, neither metadata nor thumbnails are regenerated.

Even if I use the interface

  • Include already synchronized photos (meta_all)
  • Reset all existing values in the database (meta_empty_overrides)

the synchronization will not detect any changed files too.

For your information, I'm starting the synchronization normally via script. The parameters for admin.php are:
admin.php?page=site_update&site=1
--post-data="
sync=files&
display_info=1&
add_to_caddie=1&
privacy_level=0&
sync_meta=on&
meta_all=on&
meta_empty_overrides=on&
simulate=1&
subcats-included=1&
submit=1
"
From: https://github.com/pommes-frites/piwigo-scripts/

My questions:

  1. Is there a new/other way to trigger synchronization from external sources/remote?

  2. Is there a way to delete a cache or something similar to trigger the synchronization of only content changed pictures/files/movies?

  3. If currently only the name (directory/file) is actually the detection criterion, where can I find the code that compares the directory names and directory structure? There I could build in an extension of the functionality. To recognize if a file is newer than 24h or has changed in size you can easily found out.

  4. Is there a plan to extend the recognition criteria, e.g. to size, date of modification, changed meta data?

  5. Other ideas I missed in my ignorance of Piwigo?

Thanks in advance!
If you don't have such specific requirements as in this case, Piwigo is a lot of fun. Thanks to the many developers!

Hello, I work with galleries in a directory structure. The synchronization happens hourly by script or manually by tools - > Synchronization. If I now change an image/file without changing its name, the synchronization does not recognize it as changed, neither metadata nor thumbnails are regenerated. Even if I use the interface - Include already synchronized photos (meta_all) - Reset all existing values in the database (meta_empty_overrides) the synchronization will not detect any changed files too. For your information, I'm starting the synchronization normally via script. The parameters for admin.php are: admin.php?page=site_update&site=1 --post-data=" sync=files& display_info=1& add_to_caddie=1& privacy_level=0& sync_meta=on& meta_all=on& meta_empty_overrides=on& simulate=1& subcats-included=1& submit=1 " From: https://github.com/pommes-frites/piwigo-scripts/ My questions: 1. Is there a new/other way to trigger synchronization from external sources/remote? 2. Is there a way to delete a cache or something similar to trigger the synchronization of only content changed pictures/files/movies? 3. If currently only the name (directory/file) is actually the detection criterion, where can I find the code that compares the directory names and directory structure? There I could build in an extension of the functionality. To recognize if a file is newer than 24h or has changed in size you can easily found out. 4. Is there a plan to extend the recognition criteria, e.g. to size, date of modification, changed meta data? 5. Other ideas I missed in my ignorance of Piwigo? Thanks in advance! If you don't have such specific requirements as in this case, Piwigo is a lot of fun. Thanks to the many developers! <!-- github-sync-id:613505495 -->
Author
Owner

Have learned my lesson! There are two Things. Previews are generated only if no Preview Image is present. In contrast to the metadata, which will be written to the database each time a change was made. Only if the name changes, new Preview Images will be generated. I think this could also be made dependent on the meta data vor Preview Images. So I have to delete generated Preview Images manually in /var/www/clients/client0/web6/web/_data/i/... if I want to be regenerated. Although Piwigo knows about the file has changed.

I think it would be a basic feature to let do this automatically, to delete its Preview Images too, if meta data of a file has changed?

I am in the comfortable situation that I can know if a file has been changed via rsync by its debug output. In /var/www/clients/client0/web6/web/_data/i/... I decide if I delete a preview there and let piwigo let generate a new one.

Have learned my lesson! There are two Things. Previews are generated only if no Preview Image is present. In contrast to the metadata, which will be written to the database each time a change was made. Only if the name changes, new Preview Images will be generated. I think this could also be made dependent on the meta data vor Preview Images. So I have to delete generated Preview Images manually in /var/www/clients/client0/web6/web/_data/i/... if I want to be regenerated. Although Piwigo knows about the file has changed. I think it would be a basic feature to let do this automatically, to delete its Preview Images too, if meta data of a file has changed? I am in the comfortable situation that I can know if a file has been changed via rsync by its debug output. In /var/www/clients/client0/web6/web/_data/i/... I decide if I delete a preview there and let piwigo let generate a new one. <!-- github-comment-id:628953133 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1023