RedSquirrel87 / manga-downloader

A very simple application written in JAVA to download any chapters of any manga from the supported websites
36 stars 1 forks source link

Can You improve error handling? #754

Open RedSquirrel87 opened 1 year ago

RedSquirrel87 commented 1 year ago

Original report by Ryszard Adamus (Bitbucket: [Ryszard Adamus](https://bitbucket.org/Ryszard Adamus), ).


I am currently in a location where internet access is only mobile, and it is not very good and stable as well. Downloading chapters i got errors which forced me to repeat the download few times. After analyzed the chapter folder it appeared that only one image is missing. But restart download function doesn’t care what was downloaded properly and what wasn’t so this function downloads the chapter from the beginning, and duplicates chapter folders adding number in brackets.

It may be safe approach, but in some cases it would be better to just download this one missing image than whole folder (and again and again if more errors appeared). So i just looked at the db file and log file looking for link to this missing image. DB doesn’t contain anything useful, and log file contains the error of connection and server name but no full address to image. Would it be possible to add this info into log file (when error appears) to eventually give possibility to fix the chapter manually without the needing to restart whole download?

RedSquirrel87 commented 1 year ago

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


Ok, no problem to insert it also in the TXT log file, anyway the download log inside the program (the one you can view by clicking the specific button on the program download queue zone) already report the URL of the image (the page) that failed to download if you need it.
Anyway please note that often this will not solve similar issues because the direct download link of the images will not work since they could require specific headers (host, user-agent, referer), cookies or even tokens (which expires rapidly), so if you open the image URL directly in a web browser you could just get a 403 http forbidden error

RedSquirrel87 commented 1 year ago

Original comment by Ryszard Adamus (Bitbucket: [Ryszard Adamus](https://bitbucket.org/Ryszard Adamus), ).


Yes, log file contains web page address and port, but nothing more. And i am aware that some sites require special headers like webtoons. And this cases are rare so if it doesn’t require much work on coding and doesn’t cross the line somehow, then it won’t harm and may help sometimes. TY.