Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image count goes up way too fast #49

Closed
typhoon71 opened this issue Oct 3, 2016 · 6 comments
Closed

Image count goes up way too fast #49

typhoon71 opened this issue Oct 3, 2016 · 6 comments

Comments

@typhoon71
Copy link

I noticed the image limit gets "consumed" really fast: I downloaded a zip with 31 pics, and the counter went up from 0/5000 to 265/5000.
What is happening?

@ccloli
Copy link
Owner

ccloli commented Oct 4, 2016

Hi, I've checked a gallery which most pages have original image download link. With the image limits rule, it should only take 62 * (1 + 5) = 372 limits. When I started, the image limits is 85/5000, so when I finished it should be 372 + 85 = 457.

However, thought it doesn't finished downloading, the image limits has increased to 1065 (with 57 images succeed, 10 failed times, but doesn't request a new image URL).

I'll checked what's up soon, please be patient. As I'm not sure if it is a bug or E-Hentai increased the image limits count (however the update log doesn't show this), I'll mark this issue as Question tag temporarily.

Updated: finally 1167.

@ccloli ccloli added the question label Oct 4, 2016
@ccloli
Copy link
Owner

ccloli commented Oct 4, 2016

It seems that now E-Hentai use a flexible way to calculate image limits when downloading original images.

From my test, before I viewed this page, my image limits was 1002, after that it's 1003, then I clicked download original image (1559 x 2196 485.1 KB), my limits increased to 1005 (+2).

But when I checked the gallery in previous comment, after I viewed the first page, it's 1006, and after I clicked download original image (2698 x 3840 3.98 MB), it increased to 1025 (+19).

All my test (image with * is NSFW):

So from these test, it seems that the image limits is now calculated by file size, costing 1 limit per 0.2MB (or per 200KB). So it's not a bug of E-Hentai Downloader, but E-Hentai uses a new way to calculate image limits.

I'll update the image limits wiki page soon.

Updated: The wiki page has been updated.

@ccloli ccloli closed this as completed Oct 4, 2016
@ccloli ccloli reopened this Oct 4, 2016
@ccloli
Copy link
Owner

ccloli commented Oct 4, 2016

BTW, with the new calculating ways, maybe I can pre-calculate image limits before user start downloading, so that they can know how many limits will be used.

@typhoon71
Copy link
Author

Oh, so the limit is counted based on size now, and the script shows the available points intead of the available images. Got it.
Pre-calculating would be nice, if it's possible, it would help managing the points.
Thanks for discovering what's was going on.

@ccloli
Copy link
Owner

ccloli commented Oct 5, 2016

Now the feature has been added, will be released and enabled by default in next version.

Anyway, it's just an estimated value, as I can't fetch all the pages then calculate how many limits it'll cost before downloading, it's calculated by this:

Page Length + File Total Size (MB) * 5

You can disabled it by checking Settings -> Basic -> Disable pre-calculating image limits cost. It'll be shown on the title of the action box, like Estimated Limits Cost: 6258.

qq 20161005190104

@ccloli ccloli closed this as completed Oct 6, 2016
@typhoon71
Copy link
Author

Nice, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants