mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
add category centric processing. fixes #230
This commit is contained in:
parent
c98604c618
commit
6fe287df0d
8 changed files with 135 additions and 95 deletions
|
@ -279,11 +279,11 @@ if not os.path.isfile(configFilename):
|
|||
Logger.info("MAIN: Loading config from %s", configFilename)
|
||||
config.read(configFilename)
|
||||
|
||||
cpsCategory = config.get("CouchPotato", "cpsCategory") # movie
|
||||
sbCategory = config.get("SickBeard", "sbCategory") # tv
|
||||
hpCategory = config.get("HeadPhones", "hpCategory") # music
|
||||
mlCategory = config.get("Mylar", "mlCategory") # comics
|
||||
gzCategory = config.get("Gamez", "gzCategory") # games
|
||||
cpsCategory = (config.get("CouchPotato", "cpsCategory")).split(',') # movie
|
||||
sbCategory = (config.get("SickBeard", "sbCategory")).split(',') # tv
|
||||
hpCategory = (config.get("HeadPhones", "hpCategory")).split(',') # music
|
||||
mlCategory = (config.get("Mylar", "mlCategory")).split(',') # comics
|
||||
gzCategory = (config.get("Gamez", "gzCategory")).split(',') # games
|
||||
|
||||
# NZBGet V11+
|
||||
# Check if the script is called from nzbget 11.0 or later
|
||||
|
@ -386,23 +386,23 @@ else: # only CPS supports this manual run for now.
|
|||
clientAgent = "manual"
|
||||
nzbDir, inputName, status, inputCategory, download_id = ('Manual Run', 'Manual Run', 0, cpsCategory, '')
|
||||
|
||||
if inputCategory == cpsCategory:
|
||||
if inputCategory in cpsCategory:
|
||||
Logger.info("MAIN: Calling CouchPotatoServer to post-process: %s", inputName)
|
||||
result = autoProcessMovie.process(nzbDir, inputName, status, clientAgent, download_id)
|
||||
elif inputCategory == sbCategory:
|
||||
result = autoProcessMovie.process(nzbDir, inputName, status, clientAgent, download_id, inputCategory)
|
||||
elif inputCategory in sbCategory:
|
||||
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
|
||||
result = autoProcessTV.processEpisode(nzbDir, inputName, status)
|
||||
elif inputCategory == hpCategory:
|
||||
result = autoProcessTV.processEpisode(nzbDir, inputName, status, inputCategory)
|
||||
elif inputCategory in hpCategory:
|
||||
Logger.info("MAIN: Calling HeadPhones to post-process: %s", inputName)
|
||||
result = autoProcessMusic.process(nzbDir, inputName, status)
|
||||
elif inputCategory == mlCategory:
|
||||
result = autoProcessMusic.process(nzbDir, inputName, status, inputCategory)
|
||||
elif inputCategory in mlCategory:
|
||||
Logger.info("MAIN: Calling Mylar to post-process: %s", inputName)
|
||||
result = autoProcessComics.processEpisode(nzbDir, inputName, status)
|
||||
elif inputCategory == gzCategory:
|
||||
result = autoProcessComics.processEpisode(nzbDir, inputName, status, inputCategory)
|
||||
elif inputCategory in gzCategory:
|
||||
Logger.info("MAIN: Calling Gamez to post-process: %s", inputName)
|
||||
result = autoProcessGames.process(nzbDir, inputName, status)
|
||||
result = autoProcessGames.process(nzbDir, inputName, status, inputCategory)
|
||||
else:
|
||||
Logger.warning("MAIN: The download category %s does not match any category defines in autoProcessMedia.cfg. Exiting.", inputCategory)
|
||||
Logger.warning("MAIN: The download category %s does not match any category defined in autoProcessMedia.cfg. Exiting.", inputCategory)
|
||||
sys.exit(POSTPROCESS_ERROR)
|
||||
|
||||
if result == 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue