mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 10:36:52 -07:00
parent
4ab0b3dab1
commit
5c80905cd6
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
import copy
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
import nzbtomedia
|
||||
|
||||
from nzbtomedia.nzbToMediaAutoFork import autoFork
|
||||
|
@ -140,9 +141,9 @@ class autoProcessTV:
|
|||
if section == "SickBeard":
|
||||
r = requests.get(url, auth=(username, password), params=fork_params, stream=True, verify=False)
|
||||
elif section == "NzbDrone":
|
||||
params = {"name": "DownloadedEpisodesScan", "path": dirName}
|
||||
data = json.dumps({"name": "DownloadedEpisodesScan", "path": dirName})
|
||||
headers = {"X-Api-Key": apikey}
|
||||
r = requests.get(url, params=params, headers=headers, stream=True, verify=False)
|
||||
r = requests.post(url, data=data, headers=headers, stream=True, verify=False)
|
||||
except requests.ConnectionError:
|
||||
logger.error("Unable to open URL: %s" % (url), section)
|
||||
return 1 # failure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue