[New Feature] Custom unrar parameters
Posted: 12 Dec 2014, 18:52
To unpack files NZBGet uses external unrar. The executed command looks like this:
Parameter "-p-" is replaced with "-ppassword" if a password is set for nzb-file.
Option UnrarCmd is used to specify the path to unrar. Now (r1180) the extra switches can be added directly into the option UnrarCmd. NZBGet then add other required parameters (destination path, etc.).
Examples:
Code: Select all
unrar x -y -p- -o+ *.rar /full/path/to/dest/_unpack/
Option UnrarCmd is used to specify the path to unrar. Now (r1180) the extra switches can be added directly into the option UnrarCmd. NZBGet then add other required parameters (destination path, etc.).
Examples:
- Ignore file attributes (permissions) using switch "-ai" (requested in Feature Request: File Extraction to Ignore File Permissions):
If unrar is in search path it's not necessary to specify the full path. The following will work too:
Code: Select all
/usr/bin/unrar x -ai
Code: Select all
unrar -ai
- Unpack without subdirectories (flatten):
Code: Select all
unrar e
- Decrease priority of unrar-process:
Code: Select all
nice -n 19 unrar
- If the path to unrar contain spaces put the path into apostrophes:
Code: Select all
'C:\Program Files\WinRar\unrar' -ai
- On Windows and Mac OS X the unrar is supplied with NZBGet. Since the path may contain spaces you should use apostrophes as well:
Code: Select all
'${AppDir}/unrar' -ai