mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Updated logger code to now include the section, formatting has been modified as well.
Logging of debug messages is now optional via log_debug option location in autoProcessMedia.cfg Lots of code cleanup has been performed including cleanup log messages and corrections of spelling errors. Improved release lookup code for autoProcessMovie, narrows search results down by making API calls to the download clients to compare results in CouchPotato's database.
This commit is contained in:
parent
dd41ff3b2f
commit
eb7822b60b
16 changed files with 420 additions and 441 deletions
|
@ -13,13 +13,9 @@ class autoProcessGames:
|
|||
section = nzbtomedia.CFG.findsection(inputCategory)
|
||||
if not section:
|
||||
logger.error(
|
||||
"We were unable to find a section for category %s, please check your autoProcessMedia.cfg file.", inputCategory)
|
||||
"We were unable to find a section for category %s, please check your autoProcessMedia.cfg file." % inputCategory)
|
||||
return 1
|
||||
|
||||
logger.postprocess("#########################################################")
|
||||
logger.postprocess("## ..::[%s]::.. :: CATEGORY:[%s]", section, inputCategory)
|
||||
logger.postprocess("#########################################################")
|
||||
|
||||
status = int(status)
|
||||
|
||||
host = nzbtomedia.CFG[section][inputCategory]["host"]
|
||||
|
@ -59,7 +55,7 @@ class autoProcessGames:
|
|||
params['db_id'] = gamezID
|
||||
params['status'] = downloadStatus
|
||||
|
||||
logger.debug("Opening URL: %s", url)
|
||||
logger.debug("Opening URL: %s" % (url),section)
|
||||
|
||||
try:
|
||||
r = requests.get(url, params=params)
|
||||
|
@ -68,11 +64,11 @@ class autoProcessGames:
|
|||
return 1 # failure
|
||||
|
||||
result = r.json()
|
||||
logger.postprocess("%s", result)
|
||||
logger.postprocess("%s" % (result),section)
|
||||
|
||||
if result['success']:
|
||||
logger.postprocess("Status for %s has been set to %s in Gamez", gamezID, downloadStatus)
|
||||
logger.postprocess("SUCCESS: Status for %s has been set to %s in Gamez" % (gamezID, downloadStatus),section)
|
||||
return 0 # Success
|
||||
else:
|
||||
logger.error("Status for %s has NOT been updated in Gamez", gamezID)
|
||||
logger.error("FAILED: Status for %s has NOT been updated in Gamez" % (gamezID),section)
|
||||
return 1 # failure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue