added global nice and ionice for external processes. Fixes #479

This commit is contained in:
clinton-hall 2014-07-13 12:59:56 +09:30
parent 6df93c16a1
commit 14935b5388
12 changed files with 164 additions and 30 deletions

View file

@ -318,7 +318,7 @@ def buildCommands(file, newDir):
command.extend(other_cmd)
command.append(newfilePath)
if platform.system() != 'Windows':
command = ['nice', '-%d' % nzbtomedia.NICENESS] + command
command = nzbtomedia.NICENESS + command
return command
def get_subs(file):
@ -350,7 +350,7 @@ def extract_subs(file, newfilePath, bitbucket):
outputFile = os.path.join(subdir, "%s(%s)%s.srt" %(name, n, lan))
command = [nzbtomedia.FFMPEG, '-loglevel', 'warning', '-i', sub, '-vn', '-an', '-codec:s:' + str(n), 'srt', outputFile]
if platform.system() != 'Windows':
command = ['nice', '-%d' % nzbtomedia.NICENESS] + command
command = nzbtomedia.NICENESS + command
logger.info("Extracting %s Subtitle from: %s" % (lan, file))
cmd = ""