mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
parent
e3c0d19d7e
commit
9a715773be
2 changed files with 8 additions and 6 deletions
|
@ -98,12 +98,13 @@ def extract(filePath, outputDestination):
|
||||||
os.chdir(outputDestination) # Not all unpack commands accept full paths, so just extract into this directory
|
os.chdir(outputDestination) # Not all unpack commands accept full paths, so just extract into this directory
|
||||||
devnull = open(os.devnull, 'w')
|
devnull = open(os.devnull, 'w')
|
||||||
|
|
||||||
info = subprocess.STARTUPINFO()
|
|
||||||
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
|
||||||
|
|
||||||
try: # now works same for nt and *nix
|
try: # now works same for nt and *nix
|
||||||
|
info = None
|
||||||
cmd.append(filePath) # add filePath to final cmd arg.
|
cmd.append(filePath) # add filePath to final cmd arg.
|
||||||
if platform.system() != 'Windows':
|
if platform.system() == 'Windows':
|
||||||
|
info = subprocess.STARTUPINFO()
|
||||||
|
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
|
else:
|
||||||
cmd = nzbtomedia.NICENESS + cmd
|
cmd = nzbtomedia.NICENESS + cmd
|
||||||
cmd2 = cmd
|
cmd2 = cmd
|
||||||
cmd2.append("-p-") # don't prompt for password.
|
cmd2.append("-p-") # don't prompt for password.
|
||||||
|
|
|
@ -25,8 +25,9 @@ import subprocess
|
||||||
from subprocess import CalledProcessError
|
from subprocess import CalledProcessError
|
||||||
import os
|
import os
|
||||||
|
|
||||||
info = subprocess.STARTUPINFO()
|
if os.name == 'nt':
|
||||||
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
info = subprocess.STARTUPINFO()
|
||||||
|
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
|
|
||||||
# Prevent spaces from messing with us!
|
# Prevent spaces from messing with us!
|
||||||
def _escape_param(param):
|
def _escape_param(param):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue