2012-10-30 10:43:01 +00:00
|
|
|
#!/usr/bin/env python
|
2012-09-13 15:27:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-04 16:16:40 +00:00
|
|
|
import sys, os
|
2012-10-30 10:43:01 +00:00
|
|
|
import autoProcessComics
|
2012-09-13 15:27:34 +00:00
|
|
|
|
2012-10-30 10:43:01 +00:00
|
|
|
if len(sys.argv) < 2:
|
2013-03-04 16:16:40 +00:00
|
|
|
if os.getenv('NZBPP_NZBCOMPLETED', 0):
|
|
|
|
#if this variable is set, we're being called from NZBGet
|
|
|
|
autoProcessComics.processEpisode(os.getenv('NZBPP_DIRECTORY'), os.getenv('NZBPP_NZBFILENAME'))
|
|
|
|
else:
|
|
|
|
print "No folder supplied - is this being called from SABnzbd or NZBGet?"
|
|
|
|
sys.exit()
|
2012-10-30 10:43:01 +00:00
|
|
|
elif len(sys.argv) >= 3:
|
|
|
|
autoProcessComics.processEpisode(sys.argv[1], sys.argv[3])
|
2012-09-13 15:27:34 +00:00
|
|
|
else:
|
2013-03-04 16:16:40 +00:00
|
|
|
autoProcessComics.processEpisode(sys.argv[1])
|