xob0t / Google-Photos-Toolkit

Userscript to filter, search, organize, or delete your Google Photos library
MIT License
78 stars 3 forks source link

Bug in api-utils.ExecuteWithConcurrency - chunks get skipped #12

Closed oryjkov closed 2 weeks ago

oryjkov commented 3 weeks ago

https://github.com/xob0t/Google-Photos-Toolkit/blob/0c25a41c6fe94283781719075c023d4092d2edd7/src/api/api-utils.js#L33

Promises.race([chunks]) could finish any of the chunks, while the subsequent [chunks].shift() always drops the first element in the array.

Workaround is to set batch size to 1.