deluge-extractor icon indicating copy to clipboard operation
deluge-extractor copied to clipboard

Problem extracting files that are named part01.rar

Open chrishuan9 opened this issue 10 years ago • 4 comments

The extractor plugin launches an unrar process for every .rar in the download directory when a torrent completes. Files that are named

  • XXXX.part01.rar,
  • XXXX.part02.rar
  • XXXX. part03.rar

instead of

  • .rar
  • .r01
  • .r02

spawn up multiple unrar processes.

Automatically recognizing the type of rar packaging and only extracting part01.rar would make sense.

chrishuan9 avatar Jan 31 '15 08:01 chrishuan9

Not only does this spawn multiple processes, it seems to usually fail to properly extract the complete archive as the output file is getting overwritten upon each spawned process by only the portion contained in the "part file".

spreadred avatar Feb 03 '16 22:02 spreadred

If the command 7z x XXXX.part01.rar is run, the archive extracts fine. Running 7z x on any other part file, XXXX.part02.rar for example, only extracts (I'm assuming) the data contained in that piece of the archive, not the full archive. The fix for this should be simply a matter of detecting the existence of XXXX.part01.rar, extracting it and ignoring the other part files. I'll take a look at the code and see if I can fix this.

spreadred avatar Feb 09 '16 01:02 spreadred

Any progress? This is driving me crazy.

FlyGuy94 avatar Jun 05 '16 20:06 FlyGuy94

@FlyGuy94 I'm working on it. I can easily reproduce the bug.

However, if you use 'unrar' on linux the extraction will work because 'unrar' extracts the complete file regardless of which part you actually passed as a command line option to 'unrar'. In contract, if you use '7z' the extract fails because it will only do a partial extraction of the specified part .e.g 'part03.rar'. Personally, I hadn't had noticed the bug while developing the plugin because 'unrar' always successfully extracted the archive.

temporary workaround: use unrar to extract the archive and pass the following cmd switch: -o- so it will not overwrite files.

chrishuan9 avatar Dec 07 '16 10:12 chrishuan9