mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
add 7za as alias for 7z and 7zr.
This commit is contained in:
parent
284ab6db67
commit
9b143cd6f2
2 changed files with 6 additions and 0 deletions
|
@ -630,6 +630,10 @@ def initialize(section=None):
|
||||||
try:
|
try:
|
||||||
SEVENZIP = subprocess.Popen(['which', '7zr'], stdout=subprocess.PIPE).communicate()[0].strip()
|
SEVENZIP = subprocess.Popen(['which', '7zr'], stdout=subprocess.PIPE).communicate()[0].strip()
|
||||||
except: pass
|
except: pass
|
||||||
|
if not SEVENZIP:
|
||||||
|
try:
|
||||||
|
SEVENZIP = subprocess.Popen(['which', '7za'], stdout=subprocess.PIPE).communicate()[0].strip()
|
||||||
|
except: pass
|
||||||
if not SEVENZIP:
|
if not SEVENZIP:
|
||||||
SEVENZIP = None
|
SEVENZIP = None
|
||||||
logger.warning("Failed to locate 7zip. Transcosing of disk images and extraction of .7z files will not be possible!")
|
logger.warning("Failed to locate 7zip. Transcosing of disk images and extraction of .7z files will not be possible!")
|
||||||
|
|
|
@ -47,6 +47,8 @@ def extract(filePath, outputDestination):
|
||||||
if call(['which', cmd], stdout=devnull, stderr=devnull): #note, returns 0 if exists, or 1 if doesn't exist.
|
if call(['which', cmd], stdout=devnull, stderr=devnull): #note, returns 0 if exists, or 1 if doesn't exist.
|
||||||
if cmd == "7zr" and not call(["which", "7z"]): # we do have "7z" command
|
if cmd == "7zr" and not call(["which", "7z"]): # we do have "7z" command
|
||||||
EXTRACT_COMMANDS[".7z"] = ["7z", "x"]
|
EXTRACT_COMMANDS[".7z"] = ["7z", "x"]
|
||||||
|
elif cmd == "7zr" and not call(["which", "7za"]): # we do have "7za" command
|
||||||
|
EXTRACT_COMMANDS[".7z"] = ["7za", "x"]
|
||||||
else:
|
else:
|
||||||
for k, v in EXTRACT_COMMANDS.items():
|
for k, v in EXTRACT_COMMANDS.items():
|
||||||
if cmd in v[0]:
|
if cmd in v[0]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue