Assemble of the file, with missing article (0.7.9)
Posted: January 7th, 2013, 7:58 pm
The thread which builds and writes the file to disk may contains an error : sabnzbd/assembler.py
In the _assemble function, line 154 we are logging for missing file, well this is fine, but I think this part can be improved in case of error.
Let say we have a file which is split into 3 articles : A, B and C. The expected output file is : "A B C"
But let say that B cannot be found and is missing. The written file will be "A B" and not "A random bytes B".
We should write 0x00 or 0xFF if the article "B" is missing and not just skip it.
We should also check that the decoded article is equals to the expected size of the article.
The goal is : even if there are errors, missing files, ... the output file size shall be equals to the size described into the .nzb file.
And the data of each article are located at the proper position into the output file.
I think the fix is pretty easy, if I have time I will write the patch, but I am not an expert in python
************************
Why I am asking this ?
I did download a video with missing article. With sabnzbd vlc cannot read it (vlc is not expected this block of data at this location) , but if I download it with an other client I can (there is still missing part)
And I think PAR file cannot repair (I may be wrong on this assertion) the file since the written data block are not located to the proper position
Thanks a lot for this great software
PS: I am french
In the _assemble function, line 154 we are logging for missing file, well this is fine, but I think this part can be improved in case of error.
Let say we have a file which is split into 3 articles : A, B and C. The expected output file is : "A B C"
But let say that B cannot be found and is missing. The written file will be "A B" and not "A random bytes B".
We should write 0x00 or 0xFF if the article "B" is missing and not just skip it.
We should also check that the decoded article is equals to the expected size of the article.
The goal is : even if there are errors, missing files, ... the output file size shall be equals to the size described into the .nzb file.
And the data of each article are located at the proper position into the output file.
I think the fix is pretty easy, if I have time I will write the patch, but I am not an expert in python
************************
Why I am asking this ?
I did download a video with missing article. With sabnzbd vlc cannot read it (vlc is not expected this block of data at this location) , but if I download it with an other client I can (there is still missing part)
And I think PAR file cannot repair (I may be wrong on this assertion) the file since the written data block are not located to the proper position
Thanks a lot for this great software
PS: I am french