Added code in to confirm that the clientAgent returned from the download info in the DB is correct for the script being run so that nzb's don't get processed by torrent scripts and vise-versa.

This commit is contained in:
echel0n 2014-04-22 19:11:35 -07:00
commit 0e7b8eacab
3 changed files with 11 additions and 0 deletions

View file

@ -446,6 +446,9 @@ def main(args, section=None):
downloadInfo = get_downloadInfo(os.path.basename(dirName), 0)
if downloadInfo:
clientAgent = str(downloadInfo['client_agent'][0])
if not clientAgent.lower() in nzbtomedia.NZB_CLIENTS:
continue
download_id = str(downloadInfo['input_id'][0])
logger.info("Found download info for %s, setting variables now ..." % (os.path.basename(dirName)))