Unrar .rar files in .rar archives

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
PTRCK
Posts: 46
Joined: 04 Dec 2014, 12:32

Unrar .rar files in .rar archives

Post by PTRCK » 16 Dec 2014, 21:32

Is it possible to unrar packed rars? Sometimes i have archives, that are double packed.

For example: a.rar, a.r01, a.r02 are packed with password, and in this archives is a folder with the name of the scene release. These are packed too, with b.rar, b.r01 and so on...

Is it possible to unrar these?

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: Unrar .rar files in .rar archives

Post by clintonhall » 17 Dec 2014, 00:22

Once we get teh passwordList script working, you can put 2 copies of this script into the script folder (i.e passwordList.py passwordList2.py) and set both to run
i.e run PasswordList.py and then PasswordList2.py...

in theory this should work... although it may give some issues with files already existing???

the other option is I could add an option to parse the directory again looking for new archive files....

thorli
Posts: 5
Joined: 02 Jan 2015, 15:00

Re: Unrar .rar files in .rar archives

Post by thorli » 02 Jan 2015, 16:14

Hi, i had the same need and wrote a little postprocess script for that in python. It's not very fancy but it does the job ;), feel free to use it.
Attachments
ExtendedUnrar.py
ExtendedUnrary.py - Postprocessing script to extract double packed archives
(7.03 KiB) Downloaded 1340 times

PTRCK
Posts: 46
Joined: 04 Dec 2014, 12:32

Re: Unrar .rar files in .rar archives

Post by PTRCK » 04 Jan 2015, 03:48

Maybe you can combine it with the PasswordList Script from clintonHall? https://github.com/clinton-hall/GetScripts/issues/1

PTRCK
Posts: 46
Joined: 04 Dec 2014, 12:32

Re: Unrar .rar files in .rar archives

Post by PTRCK » 07 May 2015, 21:53

@thorli: is it possible to exclude files with specific names in your script like bonus.rar?

I don't know why the script doesn't unpack the file bonus.rar. I can extract it without problems manually, but your script say it's failed.

Here is the log:

Code: Select all

ERROR	Thu May 07 2015 23:59:18	Post-process-script ExtendedUnrar.py for South.Park.S18E04.Handicar.GERMAN.DUBBED.WS.WEBRip.x264-TVP failed
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: Unpack Failed with Returncode 10
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: extracting... Bonus.rar
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: D:\Dropbox\Programme\NZBGet\UnRAR.exe e -o- D:\Downloads\South.Park.S18E04.Handicar.GERMAN.DUBBED.WS.WEBRip.x264-TVP/Bonus.rar D:\Downloads\South.Park.S18E04.Handicar.GERMAN.DUBBED.WS.WEBRip.x264-TVP
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: Found rar-file, try to extract Bonus.rar
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: Searching for rar files
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: Waiting 5 seconds to give NZBGet time to delete old rar files
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: All preliminary checks successfully performed...
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: _brokenlog.txt doesn't exist, considering download successful
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: Script triggered from NZBGet (11.0 or later).\o/
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: No files to extract
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: Extracting from D:\Downloads\South.Park.S18E04.Handicar.GERMAN.DUBBED.WS.WEBRip.x264-TVP\Bonus.rar
INFO	Thu May 07 2015 23:59:18	ExtendedUnrar: UNRAR 5.21 freeware Copyright (c) 1993-2015 Alexander Roshal
When there is no bonus.rar the script works properly.

PTRCK
Posts: 46
Joined: 04 Dec 2014, 12:32

Re: Unrar .rar files in .rar archives

Post by PTRCK » 07 May 2015, 22:06

I think it's bacause the files in the bonus.rar are already unpacked in the destination folder and when your script runs, they would be overwritten.

Edit: I fixed it myself with changing line 149+153 UnrarPath+" e -o- to UnrarPath+" e -o+

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Unrar .rar files in .rar archives

Post by hugbug » 07 May 2015, 23:08

Admin: Moving this to extension scripts sub-forum since the topic includes a script addressing the request.

PTRCK
Posts: 46
Joined: 04 Dec 2014, 12:32

Unrar .rar files in .rar archives

Post by PTRCK » 09 May 2015, 15:28

Is it possible to edit the script, so passworded files will be skipped? When there are files with password, i get: ExtendedUnrar: Unpack Failed with Returncode 10

I just want to skip to unpack those files, because the next post processing Script I use will extract them properly.

Or maybe is it possible to skip to unpack files with specific name?

thorli
Posts: 5
Joined: 02 Jan 2015, 15:00

Re: Unrar .rar files in .rar archives

Post by thorli » 09 May 2015, 16:47

PTRCK wrote:Is it possible to edit the script, so passworded files will be skipped? When there are files with password, i get: ExtendedUnrar: Unpack Failed with Returncode 10

I just want to skip to unpack those files, because the next post processing Script I use will extract them properly.

Or maybe is it possible to skip to unpack files with specific name?
In fact that files are skipped and the following script should continue the work anyway. The error should not be a problem for the postprocessing chain.

PTRCK
Posts: 46
Joined: 04 Dec 2014, 12:32

Re: Unrar .rar files in .rar archives

Post by PTRCK » 09 May 2015, 17:34

I tried a switch for unrar.exe that files with size bigger than X should be skipped to unrar. So i edited your script and added the parameter to line 149+153 but i get the same error again because the script tries to extract those files. I think it ignores the switch -SM1048576 but i tested it in a batch file manually and it worked...

Here is the log

Code: Select all

ERROR	Sat May 09 2015 19:27:38	Post-process-script ExtendedUnrar.py for South.Park.S17E05.German.DVDRip.x264-iNTENTiON failed
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Unpack Failed with Returncode 10
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: extracting... What.rar
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: D:\Dropbox\Programme\NZBGet\UnRAR.exe e -o+ -SM1048576 D:\Downloads\South.Park.S17E05.German.DVDRip.x264-iNTENTiON\f8e8f972_5acf6807_c70e397b_a6b2b8e/What.rar D:\Downloads\South.Park.S17E05.German.DVDRip.x264-iNTENTiON
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Found rar-file, try to extract What.rar
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Unpack Failed with Returncode 10
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: extracting... Click.rar
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: D:\Dropbox\Programme\NZBGet\UnRAR.exe e -o+ -SM1048576 D:\Downloads\South.Park.S17E05.German.DVDRip.x264-iNTENTiON\f8e8f972_5acf6807_c70e397b_a6b2b8e/Click.rar D:\Downloads\South.Park.S17E05.German.DVDRip.x264-iNTENTiON
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Found rar-file, try to extract Click.rar
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Searching for rar files
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Waiting 5 seconds to give NZBGet time to delete old rar files
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: All preliminary checks successfully performed...
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: _brokenlog.txt doesn't exist, considering download successful
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Script triggered from NZBGet (11.0 or later).\o/
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: No files to extract
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Extracting from D:\Downloads\South.Park.S17E05.German.DVDRip.x264-iNTENTiON\f8e8f972_5acf6807_c70e397b_a6b2b8e\What.rar
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: UNRAR 5.21 freeware Copyright (c) 1993-2015 Alexander Roshal
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: No files to extract
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: Extracting from D:\Downloads\South.Park.S17E05.German.DVDRip.x264-iNTENTiON\f8e8f972_5acf6807_c70e397b_a6b2b8e\Click.rar
INFO	Sat May 09 2015 19:27:38	ExtendedUnrar: UNRAR 5.21 freeware Copyright (c) 1993-2015 Alexander Roshal
INFO	Sat May 09 2015 19:27:33	Executing post-process-script ExtendedUnrar.py for South.Park.S17E05.German.DVDRip.x264-iNTENTiON
In the first try the script ignored the files to extract. That's correct. But the script tries it again and failed then...

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests