mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 11:38:30 -07:00
fixes for nzbget
This commit is contained in:
parent
d52eff51ea
commit
85f79fddf2
3 changed files with 5 additions and 5 deletions
|
@ -3,10 +3,10 @@
|
||||||
# adds lib directory to system path
|
# adds lib directory to system path
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from nzbtomedia.nzbToMediaConfig import config
|
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
|
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 ###
|
||||||
|
|
|
@ -5,7 +5,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
|
||||||
|
|
||||||
from nzbtomedia.nzbToMediaConfig import config
|
import nzbtomedia
|
||||||
|
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
|
@ -439,11 +439,11 @@ def main():
|
||||||
if result == 0:
|
if result == 0:
|
||||||
logger.postprocess("The nzbToMedia script completed successfully.")
|
logger.postprocess("The nzbToMedia script completed successfully.")
|
||||||
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
||||||
return nzbtomedia.NZBGET_POSTPROCESS_SUCCESS
|
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_SUCCESS)
|
||||||
else:
|
else:
|
||||||
logger.error("A problem was reported in the nzbToMedia script.")
|
logger.error("A problem was reported in the nzbToMedia script.")
|
||||||
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
||||||
return nzbtomedia.NZBGET_POSTPROCESS_ERROR
|
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_ERROR)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue