One of the most annoying things about SABnzbd is it’s failure to correctly repair broken downloads – especially when you download multiple repairable files in a single combined NZB. This often stems from SABnzbd not including all relevant par2 and part files during its repair – so the par2 command assumes far more missing files than there actually are. Below I’ll explain a method for easily including all relevant files for a (hopefully) more successful repair.
The Par2 Command
First let’s look at the par2 command:
1 2 3 4 5 6 7 8 | $ par2 ... Usage: par2 c(reate) [options] <par2 file> [files] : Create PAR2 files par2 v(erify) [options] <par2 file> [files] : Verify files using PAR2 file par2 r(epair) [options] <par2 file> [files] : Repair files using PAR2 files ... |
Based on the above we need to call
1 | par2 r <list of par2 files> <list of mkv parts> |
But how do we get those lists?
Your Download
Let’s say I’ve (legally) downloaded of episodes 8 and 9 of MyShow!. My failed download folder might include the following files:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | MyShow! - 08 [720p].mkv.001 MyShow! - 08 [720p].mkv.002 MyShow! - 08 [720p].mkv.003 MyShow! - 08 [720p].mkv.par2 MyShow! - 08 [720p].mkv.vol000+01.par2 MyShow! - 08 [720p].mkv.vol001+02.par2 MyShow! - 09 [720p].mkv.001 MyShow! - 09 [720p].mkv.002 MyShow! - 09 [720p].mkv.003 MyShow! - 09 [720p].mkv.004 MyShow! - 09 [720p].mkv.par2 MyShow! - 09 [720p].mkv.vol000+01.par2 MyShow! - 09 [720p].mkv.vol001+02.par2 MyShow! - 09 [720p].mkv.vol003+04.par2 |
We want to repair one episode at a time starting with episode 8. Here’s how I’d retrieve lists of just par2 then just the part files:
1 2 3 4 5 6 7 | # Episode 8 ls *"- 08"*.par2 # Par2 files ls *"- 08"*.[0-9][0-9][0-9] # Part files # Episode 9 ls *"- 09"*.par2 # Par2 files ls *"- 09"*.[0-9][0-9][0-9] # Part files |
Putting it All Together
Combining par2 with my above lists results in:
1 2 | par2 r *"- 08"*.par2 *"- 08"*.[0-9][0-9][0-9] # Ep 8 par2 r *"- 09"*.par2 *"- 09"*.[0-9][0-9][0-9] # Ep 9 |
You may also need to include *.mkv if that file exists but more often than not I’ve found it doesn’t.
Hope your repairs go a little smoother with this quick tip!