Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.58k stars 220 forks source link

Virtual paging for sources that don't respect the "images per page" setting #1412

Open Bionus opened 6 years ago

Bionus commented 6 years ago

On some sources (or some APIs), it is not possible to set the number of images per page. An example is the Zerochan RSS API, which always return 100 images.

If the "images per page" setting is set to 20 for example, Grabber could simply load the first Zerochan page, and use it for the 5 first "virtual pages", each containing 20 images.

⚠️ Some sources return exotic images count (37, 42, etc.), so it might not always be divisible by the images per page setting. In those cases, Grabber might need to load two pages to satisfy the setting. This might need to be disable-able.

If the user's "images per page" setting is higher than the number of images returned, Grabber might also need to load more pages, until there are enough images.

Example with 100 images returned and 20 images per page

Example with 37 images returned and 20 images per page

Example with 10 images returned and 20 images per page

MrAndre96 commented 6 years ago

Yeah this would be a good idea. Come across this multipele times when I use certain sources

brazenvoid commented 6 years ago

There can be further optional uses for such a feature. Like a setting can make Grabber enforce the image per page setting after post processing. Which will definitely reduce the amount of clicks involved and make the search experience seamless.

Unlike now that if one has an extensive blacklist or using the post filtering tags, one can end up with much lower amount of images per page.