avluis / Hentoid

Doujinshi Android App
https://discord.gg/QEZ3qk9
Apache License 2.0
1.07k stars 85 forks source link

Nhentai content urls with id ending in `1` are truncated (new downloads) #352

Closed wightwulf1944 closed 5 years ago

wightwulf1944 commented 5 years ago

Affects v1.8.5 and is 100% reproducible

Repro steps:

  1. download any nhentai content with it's id ending in 1
  2. once downloaded, tap on the web icon to open it in the app browser

Actual result: Given content with the url https://nhentai.net/g/99991/, it opens https://nhentai.net/g/9999 instead

length of the content id does not seem to affect the repro rate

RobbWatershed commented 5 years ago

Need to code an auto-repair to fix existing books

RobbWatershed commented 5 years ago

Unfortunately, the truncated ID is saved all over the app, which prevents any easy offline fix for downloaded books.

The only remaining way of fixing the issue would be to interact with nHentai itself, something along the lines of : 1- Inspect nHentai books downloaded since the introduction of the bug (2019/07/05) 2- Query nHentai with the saved book ID and see if titles match 3- If not, add 1 to book ID and retry step 2 4- If titles match, save updated book ID

That fix would require to code specific classes to query the (non-sustainable) NHentai API and create quite a lot of traffic, all to fix a minor issue.

RobbWatershed commented 5 years ago

Issue fixed for newer downloads; wontfix for downloaded books (see #371)