Page 1 of 1
Unrar is unpacking archives in archives
Posted: March 26th, 2013, 8:04 am
by jur
Hi,
I see a strange behavior. When I download for example serveral rar files Sabnzbd unpacks them. This is ok but the archives in the archives are unpacked also. This is not what I want. I looked in the settings but I can't find anything that can explain this behavior.
I have version 0.7.11 and it is running on fedora 18.
Re: Unrar is unpacking archives in archives
Posted: March 26th, 2013, 8:16 am
by shypike
SABnzbd is designed to unpack recursively.
BTW: most of the time, RARs in RARs are a sign of posters trying to hide encryption.
Re: Unrar is unpacking archives in archives
Posted: March 26th, 2013, 8:31 am
by jur
shypike wrote:SABnzbd is designed to unpack recursively.
BTW: most of the time, RARs in RARs are a sign of posters trying to hide encryption.
Is there a way to turn this off? For example if you have a installation program that is looking for zip of rar files to unpack but they are already unpacked then that is a problem.
Re: Unrar is unpacking archives in archives
Posted: March 26th, 2013, 10:04 am
by shypike
No, you cannot turn it off.
It's been like this for the last five years. with no complaints really.
Personally, I have turned of unzipping.
The trouble is that you would need to enable/disable recursive unpacking per job.
You would need to know what's inside the job, in which case you might as well choose "+Repair".
A global setting wouldn't be very helpful.
Re: Unrar is unpacking archives in archives
Posted: March 26th, 2013, 10:27 am
by jur
shypike wrote:No, you cannot turn it off.
It's been like this for the last five years. with no complaints really.
Personally, I have turned of unzipping.
The trouble is that you would need to enable/disable recursive unpacking per job.
You would need to know what's inside the job, in which case you might as well choose "+Repair".
A global setting wouldn't be very helpful.
Well it's been there for the past five years is not an argument in my opinion.
You have turned unzipping off but I don't want to have to do a manual action to start unzippen. SabNZBD has the option to unzip/unrar so why don't you use it?
Because you don't know what's inside the job sabnzbd should not run a recursive extract. If there are other archives in the main archive people should choose which to extract or not. With a recursive extract SabNZBD would destroy installation files.
A Global setting will help! The first extract is the service of SabNZBD and after that people are on there own if the want to.
Maybe if you can point me to the rights direction (which file and maybe the line) where it is set in the code of SabNZBD so I can change it for myself?
Re: Unrar is unpacking archives in archives
Posted: March 26th, 2013, 10:53 am
by shypike
jur wrote:
Well it's been there for the past five years is not an argument in my opinion.
Yes it is. It means that there has been very little demand to do it otherwise.
jur wrote:
If there are other archives in the main archive people should choose which to extract or not.
Since SABnzbd is geared towards automation, it's not an option to ask the user to choose afterwards.
I'm not going to clutter the UI with another very rarely used option.
A global setting is farthest I would want to go.
BTW: I have disabled unzipping because ZIP files are almost never used as the first layer.
Most if of the time I don't want secondary ZIP files to be unpacked.
Patching:
newsunpack.py, line 236
Code: Select all
if rerun:
z, y = unpack_magic(nzo, workdir, workdir_complete, dele, one_folder,
xjoinables, xzips, xrars, xts, depth)
Replace "rerun" with 0.
Re: Unrar is unpacking archives in archives
Posted: March 26th, 2013, 10:59 am
by jur
shypike wrote:
A global setting is farthest I would want to go.
That would be great for me but maybe other people think such setting is usefull then please comment on this thread. Then all the work is not for one person.
shypike wrote:
BTW: I have disabled unzipping because ZIP files are almost never used as the first layer.
Most if of the time I don't want secondary ZIP files to be unpacked.
Replace "rerun" with 0.
But if you have a rar in a rar file then you could have the same problem.
Thanks for the code.
Re: Unrar is unpacking archives in archives
Posted: June 5th, 2013, 3:42 pm
by speedybee
Hey,
a function like this (non-recursive unrar) is exactly what I would need also!
I download lots of stuff from usenet which is pw protected and inside the rars there are "scene like" further rars which i don´t want to be extracted either.
or i download software which contains rars in the installation packes i don´t want to have extracted - as mentioned here before.
so i would really appreciate this to be implemented soon. best option i think would be to have the choice in the unrar settings menu?
sabnzbd is the best and as far as i know only usenet downloader which supports automatic unrar of pw protected files. this would even make it perfect.
jur wrote:
Patching:
newsunpack.py, line 236
Code: Select all
if rerun:
z, y = unpack_magic(nzo, workdir, workdir_complete, dele, one_folder,
xjoinables, xzips, xrars, xts, depth)
Replace "rerun" with 0.
Can I use this fix on my own?
I found newsunpack.pyo in a rar in the installation folder but don´t know how to edit this file.
any help highly appreciated.
thanks,
speedybee
Re: Unrar is unpacking archives in archives
Posted: June 5th, 2013, 4:03 pm
by shypike
You have a compiled version, there's nothing to patch.
Have a little patience, it will appear in the 0.7.13 release, probably due this weekend.
Re: Unrar is unpacking archives in archives
Posted: June 5th, 2013, 8:35 pm
by speedybee
Great! Haven´t expected this so fast!
Thank you very much in advance.

Re: Unrar is unpacking archives in archives
Posted: October 15th, 2016, 5:44 am
by Terra_Cresta
I'm a bit late to the party.... but did this feature ever get implemented? It's something I've been looking for in a usenet downloader for some time now.
Nevermind!!! Found it lurking in the "Special" section. Sabnzbd is now my favourite
