mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Update nzbToSickBeard.py
This commit is contained in:
parent
a68a5c54b8
commit
34ab8ddedc
1 changed files with 13 additions and 30 deletions
|
@ -17,39 +17,22 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Sick Beard. If not, see <http://www.gnu.org/licenses/>.
|
# along with Sick Beard. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
|
||||||
# Edited by Clinton Hall to prevent processing of failed downloads.
|
|
||||||
# Also added suppot for NZBGet. With help from thorli
|
|
||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import autoProcessTV
|
import autoProcessTV
|
||||||
|
|
||||||
print "nzbToSickBeard V4.0"
|
if len(sys.argv) < 8:
|
||||||
|
print "Not enough arguments received from SABnzbd. Please update it."
|
||||||
# SABnzbd
|
sys.exit()
|
||||||
if len(sys.argv) == 8:
|
|
||||||
# SABnzbd argv:
|
|
||||||
# 1 The final directory of the job (full path)
|
|
||||||
# 2 The original name of the NZB file
|
|
||||||
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
|
||||||
# 4 Indexer's report number (if supported)
|
|
||||||
# 5 User-defined category
|
|
||||||
# 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
|
|
||||||
print "Script triggered from SABnzbd, starting autoProcessTV..."
|
|
||||||
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
|
||||||
|
|
||||||
# NZBGet
|
|
||||||
elif len(sys.argv) == 4:
|
|
||||||
# NZBGet argv:
|
|
||||||
# 1 The final directory of the job (full path)
|
|
||||||
# 2 The original name of the NZB file
|
|
||||||
# 3 The status of the download: 0 == successful
|
|
||||||
print "Script triggered from NZBGet, starting autoProcessTV..."
|
|
||||||
|
|
||||||
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print "Invalid number of arguments received from client."
|
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||||
sys.exit()
|
|
||||||
|
# SABnzbd argv:
|
||||||
|
# 1 The final directory of the job (full path)
|
||||||
|
# 2 The original name of the NZB file
|
||||||
|
# 3 Clean version of the job name (no path info and ".nzb" removed)
|
||||||
|
# 4 Indexer's report number (if supported)
|
||||||
|
# 5 User-defined category
|
||||||
|
# 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+21
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue