[Feature Request] Download par as soon as article fails to download

Discuss newly added features or request new features.
Post Reply
starkebn
Posts: 6
Joined: 17 Aug 2017, 06:44

[Feature Request] Download par as soon as article fails to download

Post by starkebn » 23 Apr 2021, 00:29

Currently my client will happily download rar after rar with one or more articles failing to download, then once it has finished downloading many GBs of data it will try to download par files to enable a repair of the missing data. What if instead, once some articles fail to download it then requests a par file to cover the missing article then carries on as usual after verifying there are enough par files available. I believe this would stop the client earlier if there aren't enough par files to enable a correction.

For example, if the client fails to download a combined 260 articles across a bunch of rars, but there are only enough par files that can be downloaded to repair 64 missing articles (just an example) then it would have been much less waste to stop the download earlier after knowing there was 65+ articles missing.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Feature Request] Download par as soon as article fails to download

Post by hugbug » 23 Apr 2021, 18:57

It already works this way to some degree. The health check aborts download when the program sees the download cannot be repaired. The health check compares the amount of failed data with the amount of par2-data. This check is optimistic, it may download too much before aborting. However it never aborts too soon and that's important.

The way par2-system works the whole downloaded data needs to go through par2-verification process in order to calculate if the download can be repaired or not. This cannot be done by simple comparison of the number of failed articles with the number of par2-blocks. 64 missing articles may require one par2-block for repair. That's the best case scenario. In the worst case 64 missing articles may require 128 par2-blocks if each article spans block border.

Doing par2-verifcation during download is possible in theory but is very difficult and fragile.

starkebn
Posts: 6
Joined: 17 Aug 2017, 06:44

Re: [Feature Request] Download par as soon as article fails to download

Post by starkebn » 23 Apr 2021, 22:47

okay, thanks for the reply

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests