clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
670 stars 176 forks source link

extraction process dosnt catch part01,part02,part03 etc #100

Closed jkaberg closed 11 years ago

jkaberg commented 11 years ago

only extracts the first rar archive, and not the following ones. unsure on how to proceed so im posting this up here, here's a dir list of a typical set of part files http://pastebin.com/TBSt7SDA

a typical log would be something like this http://pastebin.com/kaWJJFSG

the problem is that the extractor only extracts the "single" part0xx file and overwrites the previous extracted part0xx file, thus ending up with a singel (in this case) mkv container of the size roughly around 50~mb where it should instead joined the files into the orginal mkv container

clinton-hall commented 11 years ago

From what I can tell, extracting just part01.rar should extract the lot... where it uses the format .rar, .r00, .r01 etc this works as we only extract the .rar file (which actually extacts the lot). But for part1.rar, part2.rar etc the problem is we extract part1, which then extratcs the lot AND THEN we extarct part 2 which over-writes the first!

I think the fix will be to test for compressed archive, but then test for multiple parts (if multiple parts, only extract part1)...

clinton-hall commented 11 years ago

I recon this should do it... I added "1","01","001" to the compressed extensions... these should be handled by extractor fine.... and we ignore parts 2,3,4,5 etc

For the part01.rar format, it parses through the "second extension from the right" and tests using re for any numbers and groups them... then perform an integer conversion and only process part number 1.

please test.

jkaberg commented 11 years ago

Ok gave it a shot, heres the log, http://pastebin.com/Dkt9FBwc

Removing chp.exe solves my error, note that chp.exe throws an anti-virus warning ;)

clinton-hall commented 11 years ago

Yes... I posted about the anti-virus warning... The reason is that the ability to launch a process as hidden is what makes them flag it.... So I added the option to run without chp for anyone who preferred to delete it.

As to why it didn't work? I actually only tested it with the compiled version... never from source since source doesn't run hidden anyway.

clinton-hall commented 11 years ago

let me know if there are any other variations that don't get detected, or if this finds any false positives and ignored files it should extract.

For now, I am going to close this and see what happens.