Is it possible to exclude filetypes from unrarring

Asked by R3v0S

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 H
Solved:
Last query:
Last reply:
Revision history for this message
Best Severin H (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.

Revision history for this message
Severin H (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

Revision history for this message
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

Revision history for this message
Severin H (severinh) said :
#4

You're welcome.