mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
fix error logging for nzbdrone. #583
This commit is contained in:
parent
808c4aa3d8
commit
a00847e2e6
1 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ from nzbtomedia import logger
|
||||||
from nzbtomedia.transcoder import transcoder
|
from nzbtomedia.transcoder import transcoder
|
||||||
|
|
||||||
class autoProcessTV:
|
class autoProcessTV:
|
||||||
def numMissing(self, url1, params, headers):
|
def numMissing(self, url1, params, headers, section):
|
||||||
r = None
|
r = None
|
||||||
missing = 0
|
missing = 0
|
||||||
try:
|
try:
|
||||||
|
@ -266,7 +266,7 @@ class autoProcessTV:
|
||||||
if self.CDH(url2, headers) and clientAgent in ['sabnzbd', 'nzbget']:
|
if self.CDH(url2, headers) and clientAgent in ['sabnzbd', 'nzbget']:
|
||||||
logger.debug("Complete DownLoad Handling is enabled. Passing back to %s." % (section), section)
|
logger.debug("Complete DownLoad Handling is enabled. Passing back to %s." % (section), section)
|
||||||
return [status, "%s: Complete DownLoad Handling is enabled. Passing back to %s" % (section, section) ]
|
return [status, "%s: Complete DownLoad Handling is enabled. Passing back to %s" % (section, section) ]
|
||||||
start_numMissing = self.numMissing(url1, params, headers) # get current number of outstanding eppisodes.
|
start_numMissing = self.numMissing(url1, params, headers, section) # get current number of outstanding eppisodes.
|
||||||
logger.debug("Opening URL: %s with data: %s" % (url, str(data)), section)
|
logger.debug("Opening URL: %s with data: %s" % (url, str(data)), section)
|
||||||
r = None
|
r = None
|
||||||
r = requests.post(url, data=data, headers=headers, stream=True, verify=False)
|
r = requests.post(url, data=data, headers=headers, stream=True, verify=False)
|
||||||
|
@ -301,7 +301,7 @@ class autoProcessTV:
|
||||||
time.sleep(10 * wait_for)
|
time.sleep(10 * wait_for)
|
||||||
if not os.path.exists(dirName):
|
if not os.path.exists(dirName):
|
||||||
break
|
break
|
||||||
new_numMissing = self.numMissing(url1, params, headers)
|
new_numMissing = self.numMissing(url1, params, headers, section)
|
||||||
if new_numMissing == current_numMissing: # nothing processed since last call
|
if new_numMissing == current_numMissing: # nothing processed since last call
|
||||||
n += 1
|
n += 1
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue