mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
This commit is contained in:
parent
231d524a13
commit
f919a890ee
5 changed files with 13 additions and 6 deletions
|
@ -245,7 +245,7 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
|
||||||
result = autoProcessMovie.process(outputDestination, inputName, status, clientAgent, download_id, inputCategory)
|
result = autoProcessMovie.process(outputDestination, inputName, status, clientAgent, download_id, inputCategory)
|
||||||
elif inputCategory in sbCategory:
|
elif inputCategory in sbCategory:
|
||||||
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
|
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
|
||||||
result = autoProcessTV.processEpisode(outputDestination, inputName, status, inputCategory)
|
result = autoProcessTV.processEpisode(outputDestination, inputName, status, clientAgent, inputCategory)
|
||||||
elif inputCategory in hpCategory:
|
elif inputCategory in hpCategory:
|
||||||
Logger.info("MAIN: Calling HeadPhones to post-process: %s", inputName)
|
Logger.info("MAIN: Calling HeadPhones to post-process: %s", inputName)
|
||||||
result = autoProcessMusic.process(inputDirectory, inputName, status, inputCategory)
|
result = autoProcessMusic.process(inputDirectory, inputName, status, inputCategory)
|
||||||
|
|
|
@ -41,7 +41,7 @@ def delete(dirName):
|
||||||
Logger.exception("Unable to delete folder %s", dirName)
|
Logger.exception("Unable to delete folder %s", dirName)
|
||||||
|
|
||||||
|
|
||||||
def processEpisode(dirName, nzbName=None, failed=False, inputCategory=None):
|
def processEpisode(dirName, nzbName=None, failed=False, clientAgent=None, inputCategory=None):
|
||||||
|
|
||||||
status = int(failed)
|
status = int(failed)
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
|
@ -118,6 +118,9 @@ def processEpisode(dirName, nzbName=None, failed=False, inputCategory=None):
|
||||||
if os.path.isdir(SpecificPath):
|
if os.path.isdir(SpecificPath):
|
||||||
dirName = SpecificPath
|
dirName = SpecificPath
|
||||||
|
|
||||||
|
if clientAgent in ['nzbget','sabnzbd']: #Assume Torrent actions (unrar and link) don't happen. We need to check for valid media here.
|
||||||
|
SICKBEARD_TORRENT = []
|
||||||
|
|
||||||
if not fork in SICKBEARD_TORRENT:
|
if not fork in SICKBEARD_TORRENT:
|
||||||
process_all_exceptions(nzbName.lower(), dirName)
|
process_all_exceptions(nzbName.lower(), dirName)
|
||||||
nzbName, dirName = converto_to_ascii(nzbName, dirName)
|
nzbName, dirName = converto_to_ascii(nzbName, dirName)
|
||||||
|
|
|
@ -11,6 +11,7 @@ Added list of common sample ids and a way to set deletion of All media files les
|
||||||
Impacts NZBs
|
Impacts NZBs
|
||||||
Fix Error with manual run of nzbToMedia
|
Fix Error with manual run of nzbToMedia
|
||||||
Make sure SickBeard receives the individula download dir.
|
Make sure SickBeard receives the individula download dir.
|
||||||
|
Disabled SickBeard Torrent handling for NZBs. Fixes failed handling of nzbs that fail to extract.
|
||||||
|
|
||||||
V9.1 24/01/2014
|
V9.1 24/01/2014
|
||||||
|
|
||||||
|
|
|
@ -406,7 +406,7 @@ if inputCategory in cpsCategory:
|
||||||
result = autoProcessMovie.process(nzbDir, inputName, status, clientAgent, download_id, inputCategory)
|
result = autoProcessMovie.process(nzbDir, inputName, status, clientAgent, download_id, inputCategory)
|
||||||
elif inputCategory in sbCategory:
|
elif inputCategory in sbCategory:
|
||||||
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
|
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
|
||||||
result = autoProcessTV.processEpisode(nzbDir, inputName, status, inputCategory)
|
result = autoProcessTV.processEpisode(nzbDir, inputName, status, clientAgent, inputCategory)
|
||||||
elif inputCategory in hpCategory:
|
elif inputCategory in hpCategory:
|
||||||
Logger.info("MAIN: Calling HeadPhones to post-process: %s", inputName)
|
Logger.info("MAIN: Calling HeadPhones to post-process: %s", inputName)
|
||||||
result = autoProcessMusic.process(nzbDir, inputName, status, inputCategory)
|
result = autoProcessMusic.process(nzbDir, inputName, status, inputCategory)
|
||||||
|
|
|
@ -207,7 +207,8 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
|
||||||
|
|
||||||
# All checks done, now launching the script.
|
# All checks done, now launching the script.
|
||||||
Logger.info("Script triggered from NZBGet, starting autoProcessTV...")
|
Logger.info("Script triggered from NZBGet, starting autoProcessTV...")
|
||||||
result = autoProcessTV.processEpisode(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], status)
|
clientAgent = "nzbget"
|
||||||
|
result = autoProcessTV.processEpisode(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], status, clientAgent, os.environ['NZBPP_CATEGORY'])
|
||||||
# SABnzbd Pre 0.7.17
|
# SABnzbd Pre 0.7.17
|
||||||
elif len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
elif len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
|
@ -219,7 +220,8 @@ elif len(sys.argv) == SABNZB_NO_OF_ARGUMENTS:
|
||||||
# 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])
|
clientAgent = "sabnzbd"
|
||||||
|
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||||
# SABnzbd 0.7.17+
|
# SABnzbd 0.7.17+
|
||||||
elif len(sys.argv) >= SABNZB_0717_NO_OF_ARGUMENTS:
|
elif len(sys.argv) >= SABNZB_0717_NO_OF_ARGUMENTS:
|
||||||
# SABnzbd argv:
|
# SABnzbd argv:
|
||||||
|
@ -232,7 +234,8 @@ elif len(sys.argv) >= SABNZB_0717_NO_OF_ARGUMENTS:
|
||||||
# 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
|
||||||
# 8 Failure URL
|
# 8 Failure URL
|
||||||
Logger.info("Script triggered from SABnzbd 0.7.17+, starting autoProcessTV...")
|
Logger.info("Script triggered from SABnzbd 0.7.17+, starting autoProcessTV...")
|
||||||
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
clientAgent = "sabnzbd"
|
||||||
|
result = autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||||
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