mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
Headphones fix for issue #321
This commit is contained in:
parent
657fe66b66
commit
b8b2f4923f
3 changed files with 7 additions and 18 deletions
|
@ -1,12 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# adds lib directory to system path
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
|
|
||||||
|
|
||||||
import nzbtomedia
|
|
||||||
|
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
### NZBGET POST-PROCESSING SCRIPT ###
|
### NZBGET POST-PROCESSING SCRIPT ###
|
||||||
|
@ -37,6 +29,9 @@ import nzbtomedia
|
||||||
|
|
||||||
### NZBGET POST-PROCESSING SCRIPT ###
|
### NZBGET POST-PROCESSING SCRIPT ###
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import nzbtomedia
|
||||||
|
|
||||||
def is_sample(filePath, inputName, maxSampleSize, SampleIDs):
|
def is_sample(filePath, inputName, maxSampleSize, SampleIDs):
|
||||||
# 200 MB in bytes
|
# 200 MB in bytes
|
||||||
|
@ -118,7 +113,6 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
|
||||||
print "Error: unable to delete file", filePath
|
print "Error: unable to delete file", filePath
|
||||||
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_ERROR)
|
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_ERROR)
|
||||||
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_SUCCESS)
|
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_SUCCESS)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print "This script can only be called from NZBGet (11.0 or later)."
|
print "This script can only be called from NZBGet (11.0 or later)."
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# adds lib directory to system path
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
|
|
||||||
|
|
||||||
import nzbtomedia
|
|
||||||
|
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
### NZBGET POST-PROCESSING SCRIPT ###
|
### NZBGET POST-PROCESSING SCRIPT ###
|
||||||
|
@ -20,6 +12,9 @@ import nzbtomedia
|
||||||
|
|
||||||
### NZBGET POST-PROCESSING SCRIPT ###
|
### NZBGET POST-PROCESSING SCRIPT ###
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import nzbtomedia
|
||||||
|
|
||||||
if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5] < '11.0':
|
if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5] < '11.0':
|
||||||
print "Script triggered from NZBGet (11.0 or later)."
|
print "Script triggered from NZBGet (11.0 or later)."
|
||||||
|
|
|
@ -78,7 +78,7 @@ class autoProcessMusic:
|
||||||
params = {}
|
params = {}
|
||||||
params['apikey'] = apikey
|
params['apikey'] = apikey
|
||||||
params['cmd'] = "forceProcess"
|
params['cmd'] = "forceProcess"
|
||||||
params['dir'] = dirName
|
params['dir'] = os.path.dirname(dirName)
|
||||||
|
|
||||||
url = baseURL
|
url = baseURL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue