Some plugins may need to add actions after a group of pictures are uploaded.
'invalidate_user_cache' is not suitable because called after each picture.
Difficulty is specially with uploads through the API.
**Reported by mistic100 on 21 Jun 2011 15:21**
**Version:** 2.2.3
Some plugins may need to add actions after a group of pictures are uploaded.
'invalidate_user_cache' is not suitable because called after each picture.
Difficulty is specially with uploads through the API.
[Piwigo Bugtracker #2357](http://piwigo.org/bugs/view.php?id=2357)
<!-- github-sync-id:97226280 -->
If I remember correctly the initial need was to update SmartAlbums only once after uploading X files instead of after each file.
I don't think `loc_end_add_uploaded_file` solves this.
https://github.com/Piwigo/Piwigo-SmartAlbums/blob/master/main.inc.php#L68
<!-- github-comment-id:771975639 -->
For now, I plan to add a call to a new API method pwg.images.emptyLounge at the end of the web upload (using several pwg.images.upload calls). I can keep this emptyLounge method and also add a pwg.images.uploadCompleted (like we have a community.images.uploadCompleted). In this method I could add a trigger. What kind of data you would think useful for plugins like SmartAlbums? list of new image ids ? list of updated category ids ?
@mistic100 as described on https://piwigo.org/forum/viewtopic.php?pid=180845#p180845 I'm implementing a "lounge", which is a temporary place where photos wait before taking off :-)
For now, I plan to add a call to a new API method `pwg.images.emptyLounge` at the end of the web upload (using several `pwg.images.upload` calls). I can keep this `emptyLounge` method and also add a `pwg.images.uploadCompleted` (like we have a `community.images.uploadCompleted`). In this method I could add a trigger. What kind of data you would think useful for plugins like SmartAlbums? list of new image ids ? list of updated category ids ?
<!-- github-comment-id:847895322 -->
I don't think we can make shortcuts in smart_make_all_associations there are too many possible rules, it cannot be optimized
I don't think we can make shortcuts in `smart_make_all_associations` there are too many possible rules, it cannot be optimized
<!-- github-comment-id:847926875 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by mistic100 on 21 Jun 2011 15:21
Version: 2.2.3
Some plugins may need to add actions after a group of pictures are uploaded.
'invalidate_user_cache' is not suitable because called after each picture.
Difficulty is specially with uploads through the API.
Piwigo Bugtracker #2357
See #525
If I remember correctly the initial need was to update SmartAlbums only once after uploading X files instead of after each file.
I don't think
loc_end_add_uploaded_filesolves this.https://github.com/Piwigo/Piwigo-SmartAlbums/blob/master/main.inc.php#L68
The upcoming "lounge" mecanism might be a solution.
@mistic100 as described on https://piwigo.org/forum/viewtopic.php?pid=180845#p180845 I'm implementing a "lounge", which is a temporary place where photos wait before taking off :-)
For now, I plan to add a call to a new API method
pwg.images.emptyLoungeat the end of the web upload (using severalpwg.images.uploadcalls). I can keep thisemptyLoungemethod and also add apwg.images.uploadCompleted(like we have acommunity.images.uploadCompleted). In this method I could add a trigger. What kind of data you would think useful for plugins like SmartAlbums? list of new image ids ? list of updated category ids ?I don't think we can make shortcuts in
smart_make_all_associationsthere are too many possible rules, it cannot be optimized