Is it possible to exclude filetypes from unrarring

Asked by R3v0S on 2009-03-21

The problem is this:

When downloading a rarred .cbr file, the .cbr file is unrarred as well when all files are downloaded. So, I end up with a lot of jpg's in a directory, instead of 1 single .cbr file for my comicbook reader.

Is it possible to exclude .cbr from unrarring?

Question information

Language:
English Edit question
Status:
Solved
For:
LottaNZB Edit question
Assignee:
No assignee Edit question
Solved by:
Severin Heiniger
Solved:
2009-03-22
Last query:
2009-03-22
Last reply:
2009-03-21
Best Severin Heiniger (severinh) said : #1

Hi R3v0S,

unfortunately, there is no convenient way of changing this behaviour. Editing HellaNZB's source code looks like the only possible solution. If you feel up to it, you could edit the file PostProcessorUtil.py, which can either be found in /usr/share/python-support/hellanzb/Hellanzb or /usr/lib/python2.x/site-packages/hellanzb/Hellanzb/, depending on your distribution. In this file, the line

    if firstFourBytes == RAR_HEADER:

can be changed to

    if firstFourBytes == RAR_HEADER and ext.lower() != "cbr":

I didn't test it, but I'm pretty sure it will work. I know that this is not the best solution. One might file a bug report at hellanzb.com and propose an equivalent fix.

Severin Heiniger (severinh) said : #2

This problem has been fixed about two months after the latest release of HellaNZB, which was about two years ago:

http://hellanzb.com/trac/hellanzb/changeset/1077

R3v0S (thijz-) said : #3

I've changed the line, as suggested above, in /usr/share/python-support/hellanzb/Hellanzb/PostProcessorUtil.py. Restarted LottaNZB, and it works like a charm! Rarred .cbr files are now unpacked, and the .cbr file stays intact.

Thanks

Severin Heiniger (severinh) said : #4

You're welcome.