Pad failed downloads with zeros

Want something added? Ask for it here.
Post Reply
charun
Release Testers
Release Testers
Posts: 1
Joined: April 17th, 2009, 11:34 pm

Pad failed downloads with zeros

Post by charun »

An option to pad out the failed download parts of a file with zeros would be handy so that files can be checked properly by torrent programs. At the moment, one failed part offsets the rest of the file and causes any valid data afterwards looks corrupt.

This could be related to Ticket #226.
Last edited by charun on April 17th, 2009, 11:42 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Pad failed downloads with zeros

Post by shypike »

The par2 program doesn't require filling the missing parts with zero's.
I fail to see what torrent programs have to do with it.
codingismy11to7
Newbie
Newbie
Posts: 2
Joined: August 9th, 2010, 12:09 pm

Re: Pad failed downloads with zeros

Post by codingismy11to7 »

Oh man, I wondered why this didn't work with SAB but works with all other nntp clients I've used.
This is VERY annoying, and I also don't understand why it's there - yDec has a file position, and in Unison and the NNTP client I wrote, after yDecoding it writes the data to the correct position in the file. This allows torrent clients to verify the data and resume the download and only fetch the broken blocks.
I don't know how par2 verifies the file, but torrent clients obviously do it differently.
In summary:
* download an NZB with pars, verify fails, needs X more repair blocks (but the download is mostly complete)
* find a torrent file with the exact same files
* add it to, say, Transmission, point the download to the NNTP download location, select Verify Data
* the torrent client only needs to download a little bit to finish repairing the files, as long as the nntp client wrote file data to the correct positions in the file
codingismy11to7
Newbie
Newbie
Posts: 2
Joined: August 9th, 2010, 12:09 pm

Re: Pad failed downloads with zeros

Post by codingismy11to7 »

I wrote a patch for this, and it's working great. A broken 800MB download loaded into Transmission with 23MB remaining, and was quickly finished off :)

If this affects you too, you can consider going to https://bugs.launchpad.net/sabnzbd/+bug/615535 and selecting the "affects me" option.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Pad failed downloads with zeros

Post by shypike »

SABnzbd and most other Usenet clients use par2 files to verify downloads
and to repair them. Without the need for a Torrent client.

Maybe I'm dense, but can you explain why (and how) you use a Torrent client to do Usenet repairs?
Post Reply