mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
Merge pull request #1403 from nikagl/nightly
Start vbs directly from extractor and use args instead of Wscript.Arguments
This commit is contained in:
commit
c81d8bc7a5
3 changed files with 4 additions and 5 deletions
|
@ -1,2 +0,0 @@
|
||||||
start /B /wait wscript "%~dp0\invisible.vbs" %*
|
|
||||||
exit %ERRORLEVEL%
|
|
|
@ -17,5 +17,5 @@ end if
|
||||||
|
|
||||||
Set WshShell = WScript.CreateObject("WScript.Shell")
|
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||||
|
|
||||||
returnValue = WshShell.Run("""" & WScript.Arguments(1) & """" & sargs, WScript.Arguments(0), True)
|
returnValue = WshShell.Run("""" & args(1) & """" & sargs, args(0), True)
|
||||||
WScript.Quit(returnValue)
|
WScript.Quit(returnValue)
|
||||||
|
|
|
@ -17,8 +17,9 @@ def extract(filePath, outputDestination):
|
||||||
if not os.path.exists(core.SEVENZIP):
|
if not os.path.exists(core.SEVENZIP):
|
||||||
core.logger.error("EXTRACTOR: Could not find 7-zip, Exiting")
|
core.logger.error("EXTRACTOR: Could not find 7-zip, Exiting")
|
||||||
return False
|
return False
|
||||||
invislocation = os.path.join(core.PROGRAM_DIR, 'core', 'extractor', 'bin', 'invisible.cmd')
|
wscriptlocation = os.path.join(os.environ['WINDIR'], 'system32', 'wscript.exe')
|
||||||
cmd_7zip = [invislocation, str(core.SHOWEXTRACT), core.SEVENZIP, "x", "-y"]
|
invislocation = os.path.join(core.PROGRAM_DIR, 'core', 'extractor', 'bin', 'invisible.vbs')
|
||||||
|
cmd_7zip = [wscriptlocation, invislocation, str(core.SHOWEXTRACT), core.SEVENZIP, "x", "-y"]
|
||||||
ext_7zip = [".rar", ".zip", ".tar.gz", "tgz", ".tar.bz2", ".tbz", ".tar.lzma", ".tlz", ".7z", ".xz"]
|
ext_7zip = [".rar", ".zip", ".tar.gz", "tgz", ".tar.bz2", ".tbz", ".tar.lzma", ".tlz", ".7z", ".xz"]
|
||||||
EXTRACT_COMMANDS = dict.fromkeys(ext_7zip, cmd_7zip)
|
EXTRACT_COMMANDS = dict.fromkeys(ext_7zip, cmd_7zip)
|
||||||
# Using unix
|
# Using unix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue