lnreader icon indicating copy to clipboard operation
lnreader copied to clipboard

Download count continues if you cut off internet

Open Palloxin opened this issue 2 years ago • 3 comments

Steps to reproduce

  1. Go to a random novel
  2. Download all chapters
  3. Make the app download 5 chapters and then immediately turn off internet
  4. watch the download count(notification) increase even without internet
  5. after 10 chapters (so chapter 15) turn internet on again
  6. Go to Download Queue section and watch the actual download resuming from chapter 16 ignoring all chapters from 15 and below.

Expected behavior

Downloading fails, the app should check if internet is avaiable. IF it is not, wait x seconds and retry on that chapter. I am not sure how it should behave if the download fails and internet is avaiable.

Actual behavior

With no internet the download fails and the app tries to download the next chapter repeating this process endelessly.

LNReader version

1.1.18

Android version

A8

Device

Huawei p8 lite 2017

Other details

https://github.com/LNReader/lnreader/assets/75091899/ecddc1b4-48d9-43d0-805c-c1b5e1ce702a

Also.. probably related to #403

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • [X] I have written a short but informative title.
  • [X] If this is an issue with a source, I should be opening an issue in the sources repository.
  • [X] I have updated the app to version 1.1.18.
  • [X] I will fill out all of the requested information in this form.

Palloxin avatar Nov 11 '23 09:11 Palloxin

I just noticed that if it happens it would normally spam notifications with the related sound for EVERY chapter failed. I turned off this previously so i didn't notice: IMG_20240128_094231

https://github.com/LNReader/lnreader/assets/75091899/7b69453a-2f03-448d-b4b4-cf92d819535a

Palloxin avatar Jan 28 '24 08:01 Palloxin

in v2 app, if no internet app would throws errors on notifications, and chapters would not be marked as downloaded. I think if your connection is slow app would still keep connection until it reaches timeout. If you turn off internet yourself, cant help.

nyagami avatar Jul 15 '24 10:07 nyagami

I present you "my" wobbly connection: https://github.com/user-attachments/assets/fe95b535-df8a-4988-a624-592dc2faa53d

The download queue is not linear. These are missed chapters the download controllee skips due to connection problems.

Imagine users with a weak and limited connection downloading chapters "for the winter" and then discover there are undownloaded stuff (holes) "in the winter".

It can be a problem even when making epubs since they can be shared with others.

Also on cloudflare protected sources. If one mass downloads stuff and suddenly the cf protection kicks in again it will be annoying.

Tachiyomi doesnt have this problem.

PS: winter days means no internet periods.

Palloxin avatar Jul 21 '24 23:07 Palloxin

I also found out that while downloading, the source can reset the cloudflare verification, making rows of chapters fail to download:

https://github.com/user-attachments/assets/041a86c8-58e5-4396-847b-cd728bbbbeb0

Palloxin avatar Jan 20 '25 13:01 Palloxin