mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Merge 2bf1240565
into 59c886b16e
This commit is contained in:
commit
8f61c396f7
6 changed files with 86 additions and 87 deletions
|
@ -14,7 +14,7 @@ Logger.info("====================") # Seperate old from new log
|
||||||
Logger.info("nzbToCouchPotato %s", VERSION)
|
Logger.info("nzbToCouchPotato %s", VERSION)
|
||||||
|
|
||||||
# SABnzbd
|
# SABnzbd
|
||||||
if len(sys.argv) == 8:
|
if len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
|
@ -25,16 +25,14 @@ if len(sys.argv) == 8:
|
||||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||||
Logger.info("Script triggered from SABnzbd, starting autoProcessMovie...")
|
Logger.info("Script triggered from SABnzbd, starting autoProcessMovie...")
|
||||||
result = autoProcessMovie.process(sys.argv[1], sys.argv[2], sys.argv[7])
|
result = autoProcessMovie.process(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||||
|
|
||||||
# NZBGet
|
# NZBGet
|
||||||
elif len(sys.argv) == 4:
|
elif len(sys.argv) == NZBGET_NO_OF_ARGUMENTS:
|
||||||
# NZBGet argv:
|
# NZBGet argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
# 3 The status of the download: 0 == successful
|
# 3 The status of the download: 0 == successful
|
||||||
Logger.info("Script triggered from NZBGet, starting autoProcessMovie...")
|
Logger.info("Script triggered from NZBGet, starting autoProcessMovie...")
|
||||||
result = autoProcessMovie.process(sys.argv[1], sys.argv[2], sys.argv[3])
|
result = autoProcessMovie.process(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Logger.warn("Invalid number of arguments received from client.")
|
Logger.warn("Invalid number of arguments received from client.")
|
||||||
Logger.info("Running autoProcessMovie as a manual run...")
|
Logger.info("Running autoProcessMovie as a manual run...")
|
||||||
|
|
6
nzbToGamez → nzbToGamez.py
Normal file → Executable file
6
nzbToGamez → nzbToGamez.py
Normal file → Executable file
|
@ -14,7 +14,7 @@ Logger.info("====================") # Seperate old from new log
|
||||||
Logger.info("nzbToGamez %s", VERSION)
|
Logger.info("nzbToGamez %s", VERSION)
|
||||||
|
|
||||||
# SABnzbd
|
# SABnzbd
|
||||||
if len(sys.argv) == 8:
|
if len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
|
@ -25,16 +25,14 @@ if len(sys.argv) == 8:
|
||||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||||
Logger.info("Script triggered from SABnzbd, starting autoProcessGames...")
|
Logger.info("Script triggered from SABnzbd, starting autoProcessGames...")
|
||||||
result = autoProcessGames.process(sys.argv[1], sys.argv[2], sys.argv[7])
|
result = autoProcessGames.process(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||||
|
|
||||||
# NZBGet
|
# NZBGet
|
||||||
elif len(sys.argv) == 4:
|
elif len(sys.argv) == NZBGET_NO_OF_ARGUMENTS:
|
||||||
# NZBGet argv:
|
# NZBGet argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
# 3 The status of the download: 0 == successful
|
# 3 The status of the download: 0 == successful
|
||||||
Logger.info("Script triggered from NZBGet, starting autoProcessGames...")
|
Logger.info("Script triggered from NZBGet, starting autoProcessGames...")
|
||||||
result = autoProcessGames.process(sys.argv[1], sys.argv[2], sys.argv[3])
|
result = autoProcessGames.process(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Logger.warn("Invalid number of arguments received from client. Exiting")
|
Logger.warn("Invalid number of arguments received from client. Exiting")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
6
nzbToHeadPhones.py
Normal file → Executable file
6
nzbToHeadPhones.py
Normal file → Executable file
|
@ -14,7 +14,7 @@ Logger.info("====================") # Seperate old from new log
|
||||||
Logger.info("nzbToHeadPhones %s", VERSION)
|
Logger.info("nzbToHeadPhones %s", VERSION)
|
||||||
|
|
||||||
# SABnzbd
|
# SABnzbd
|
||||||
if len(sys.argv) == 8:
|
if len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
|
@ -25,16 +25,14 @@ if len(sys.argv) == 8:
|
||||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||||
Logger.info("Script triggered from SABnzbd, starting autoProcessMusic...")
|
Logger.info("Script triggered from SABnzbd, starting autoProcessMusic...")
|
||||||
result = autoProcessMusic.process(sys.argv[1], sys.argv[2], sys.argv[7])
|
result = autoProcessMusic.process(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||||
|
|
||||||
# NZBGet
|
# NZBGet
|
||||||
elif len(sys.argv) == 4:
|
elif len(sys.argv) == NZBGET_NO_OF_ARGUMENTS:
|
||||||
# NZBGet argv:
|
# NZBGet argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
# 3 The status of the download: 0 == successful
|
# 3 The status of the download: 0 == successful
|
||||||
Logger.info("Script triggered from NZBGet, starting autoProcessMusic...")
|
Logger.info("Script triggered from NZBGet, starting autoProcessMusic...")
|
||||||
result = autoProcessMusic.process(sys.argv[1], sys.argv[2], sys.argv[3])
|
result = autoProcessMusic.process(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Logger.warn("Invalid number of arguments received from client.")
|
Logger.warn("Invalid number of arguments received from client.")
|
||||||
Logger.info("Running autoProcessMusic as a manual run...")
|
Logger.info("Running autoProcessMusic as a manual run...")
|
||||||
|
|
|
@ -1 +1,10 @@
|
||||||
|
# Make things easy and less error prone by centralising all common values
|
||||||
|
|
||||||
|
# Global Constants
|
||||||
VERSION = 'V6.1'
|
VERSION = 'V6.1'
|
||||||
|
|
||||||
|
# Constants pertinant to SabNzb
|
||||||
|
SABNZB_NO_OF_ARGUMENTS = 8
|
||||||
|
|
||||||
|
# Constants pertinant to NzbGet
|
||||||
|
NZBGET_NO_OF_ARGUMENTS = 4
|
||||||
|
|
6
nzbToMylar.py
Normal file → Executable file
6
nzbToMylar.py
Normal file → Executable file
|
@ -14,7 +14,7 @@ Logger.info("====================") # Seperate old from new log
|
||||||
Logger.info("nzbToMylar %s", VERSION)
|
Logger.info("nzbToMylar %s", VERSION)
|
||||||
|
|
||||||
# SABnzbd
|
# SABnzbd
|
||||||
if len(sys.argv) == 8:
|
if len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
|
@ -25,16 +25,14 @@ if len(sys.argv) == 8:
|
||||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||||
Logger.info("Script triggered from SABnzbd, starting autoProcessComics...")
|
Logger.info("Script triggered from SABnzbd, starting autoProcessComics...")
|
||||||
result = autoProcessComics.processEpisode(sys.argv[1], sys.argv[3], sys.argv[7])
|
result = autoProcessComics.processEpisode(sys.argv[1], sys.argv[3], sys.argv[7])
|
||||||
|
|
||||||
# NZBGet
|
# NZBGet
|
||||||
elif len(sys.argv) == 4:
|
elif len(sys.argv) == NZBGET_NO_OF_ARGUMENTS:
|
||||||
# NZBGet argv:
|
# NZBGet argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
# 3 The status of the download: 0 == successful
|
# 3 The status of the download: 0 == successful
|
||||||
Logger.info("Script triggered from NZBGet, starting autoProcessComics...")
|
Logger.info("Script triggered from NZBGet, starting autoProcessComics...")
|
||||||
result = autoProcessComics.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
result = autoProcessComics.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Logger.warn("Invalid number of arguments received from client. Exiting")
|
Logger.warn("Invalid number of arguments received from client. Exiting")
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
|
@ -36,7 +36,7 @@ Logger.info("====================") # Seperate old from new log
|
||||||
Logger.info("nzbToSickBeard %s", VERSION)
|
Logger.info("nzbToSickBeard %s", VERSION)
|
||||||
|
|
||||||
# SABnzbd
|
# SABnzbd
|
||||||
if len(sys.argv) == 8:
|
if len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
|
@ -47,16 +47,14 @@ if len(sys.argv) == 8:
|
||||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||||
Logger.info("Script triggered from SABnzbd, starting autoProcessTV...")
|
Logger.info("Script triggered from SABnzbd, starting autoProcessTV...")
|
||||||
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||||
|
|
||||||
# NZBGet
|
# NZBGet
|
||||||
elif len(sys.argv) == 4:
|
elif len(sys.argv) == NZBGET_NO_OF_ARGUMENTS:
|
||||||
# NZBGet argv:
|
# NZBGet argv:
|
||||||
# 1 The final directory of the job (full path)
|
# 1 The final directory of the job (full path)
|
||||||
# 2 The original name of the NZB file
|
# 2 The original name of the NZB file
|
||||||
# 3 The status of the download: 0 == successful
|
# 3 The status of the download: 0 == successful
|
||||||
Logger.info("Script triggered from NZBGet, starting autoProcessTV...")
|
Logger.info("Script triggered from NZBGet, starting autoProcessTV...")
|
||||||
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Logger.debug("Invalid number of arguments received from client.")
|
Logger.debug("Invalid number of arguments received from client.")
|
||||||
Logger.info("Running autoProcessTV as a manual run...")
|
Logger.info("Running autoProcessTV as a manual run...")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue