Page 1 of 1

Enhance Retry Function

Posted: October 13th, 2012, 8:11 pm
by Cpuroast
Hi Shypike,

I just thought of 2 ways to enhance the job retry process.

Say you have a rar/par2 set posted.
You download it, you end up with too much corruption to repair even with all par2 files available.

Now you find that the the same rar set with the same or a new par2 set got re-posted. You create an nzb, hit retry, feed sab the nzb.

Currently what sab does, is it downloads only the par2 files in the new nzb in the hopes of having enough to complete a repair.
The issue with that, is that since it's a repost, it could actually be a new par2 set, therefore sab won't gain anything, since it currently doesn't re-check the rar set with the potentially new par2 set available in the new nzb. That's the 1st enhancement, if sab detects a new par2 set, re-check the rar set with it and continue with the standard behaviour of downloading progressively more and more par2 files until they are exhausted.

Second, this is where it gets a bit more complex.

Sab knows how many par2 blocks are needed to complete a repair since par2 told it, this could be in the original par2 set or as I mentioned above with the 1st enhancement in the potentially new par2 set available in the new nzb file.

Par2 also knows exactly how many valid blocks are in each broken rar files. Sab could track this and attempt a re-download of the least amount of rar files(+say 10% to account for the possibility of non-intact files being downloaded but less broken files on the 2nd attempt) needed to fulfil the missing block count for a repair from this new nzb and store them side by side with the 1st attempt with something like a .take2 suffix.

After doing this it would simply re-run a par2 check and if par2 now has enough intact files or enough less broken files + all the previously downloaded par2 files to meet the required block count for a repair, off it goes and you end up with a repaired/complete rar set.

Now if the 2nd attempt wasn't enough, as in if the 1st set of .take2 files are still not enough(like if the files were still too broken), it just goes through the process again and moves on to re-downloading the next set(minimum +10%) of broken files from the new nzb, skipping the set of files it already re-downloaded in the previous attempt.

Rinse and repeat until a successful repair happens or until it's exhausted all it's potential candidates for a download re-try.

I'm not much of a programmer but I'm curious if what I suggested is at all possible. It sounds feasible to me.

Thanks again for this great application!

Re: Enhance Retry Function

Posted: October 19th, 2012, 4:49 pm
by shypike
Some nice suggestions, but generally way to complicated.
There will be some improvements in the future,
but SABnzbd is not the app for scraping together files to complete a download.
It's also a question of priority, and currently there are others.
BTW: it will all get unbelievably complex and still not work in all cases where it could work.
There are just too many bad and weird posts.