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,28 +14,26 @@ 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
|
||||||
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
||||||
# 4 Indexer's report number (if supported)
|
# 4 Indexer's report number (if supported)
|
||||||
# 5 User-defined category
|
# 5 User-defined category
|
||||||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||||
# 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...")
|
||||||
result = autoProcessMovie.process('Manual Run', 'Manual Run', 0)
|
result = autoProcessMovie.process('Manual Run', 'Manual Run', 0)
|
||||||
|
|
30
nzbToGamez → nzbToGamez.py
Normal file → Executable file
30
nzbToGamez → nzbToGamez.py
Normal file → Executable file
|
@ -14,27 +14,25 @@ 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
|
||||||
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
||||||
# 4 Indexer's report number (if supported)
|
# 4 Indexer's report number (if supported)
|
||||||
# 5 User-defined category
|
# 5 User-defined category
|
||||||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||||
# 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)
|
30
nzbToHeadPhones.py
Normal file → Executable file
30
nzbToHeadPhones.py
Normal file → Executable file
|
@ -14,27 +14,25 @@ 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
|
||||||
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
||||||
# 4 Indexer's report number (if supported)
|
# 4 Indexer's report number (if supported)
|
||||||
# 5 User-defined category
|
# 5 User-defined category
|
||||||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||||
# 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
|
||||||
|
|
30
nzbToMylar.py
Normal file → Executable file
30
nzbToMylar.py
Normal file → Executable file
|
@ -14,27 +14,25 @@ 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
|
||||||
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
||||||
# 4 Indexer's report number (if supported)
|
# 4 Indexer's report number (if supported)
|
||||||
# 5 User-defined category
|
# 5 User-defined category
|
||||||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||||
# 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,27 +36,25 @@ 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
|
||||||
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
||||||
# 4 Indexer's report number (if supported)
|
# 4 Indexer's report number (if supported)
|
||||||
# 5 User-defined category
|
# 5 User-defined category
|
||||||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||||
# 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