mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 16:22:45 +00:00
e2a2f654f0
If ComicRN.py is called from an NZBget post-processing script, the downloaded comic should be processed correctly. For safety, this should be filtered by category at the NZBget end.
19 lines
555 B
Python
Executable file
19 lines
555 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
import sys, os
|
|
import autoProcessComics
|
|
|
|
if len(sys.argv) < 2:
|
|
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()
|
|
elif len(sys.argv) >= 3:
|
|
autoProcessComics.processEpisode(sys.argv[1], sys.argv[3])
|
|
else:
|
|
autoProcessComics.processEpisode(sys.argv[1])
|