Unrar is unpacking archives in archives

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
jur
Newbie
Newbie
Posts: 4
Joined: March 26th, 2013, 8:00 am

Unrar is unpacking archives in archives

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Unrar is unpacking archives in archives

Post 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.
jur
Newbie
Newbie
Posts: 4
Joined: March 26th, 2013, 8:00 am

Re: Unrar is unpacking archives in archives

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Unrar is unpacking archives in archives

Post 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.
jur
Newbie
Newbie
Posts: 4
Joined: March 26th, 2013, 8:00 am

Re: Unrar is unpacking archives in archives

Post 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?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Unrar is unpacking archives in archives

Post 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.
jur
Newbie
Newbie
Posts: 4
Joined: March 26th, 2013, 8:00 am

Re: Unrar is unpacking archives in archives

Post 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.
speedybee
Newbie
Newbie
Posts: 2
Joined: June 5th, 2013, 2:50 pm

Re: Unrar is unpacking archives in archives

Post 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
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Unrar is unpacking archives in archives

Post 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.
speedybee
Newbie
Newbie
Posts: 2
Joined: June 5th, 2013, 2:50 pm

Re: Unrar is unpacking archives in archives

Post by speedybee »

Great! Haven´t expected this so fast!
Thank you very much in advance. :)
Terra_Cresta
Newbie
Newbie
Posts: 1
Joined: October 15th, 2016, 5:42 am

Re: Unrar is unpacking archives in archives

Post 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 ;D
Post Reply