Commit acd17578 authored by echel0n's avatar echel0n
Browse files

Config settings are now stored and encrypted into a sqlite database

Added code to migrate existing config files to new config database
Refactored the term indexer to series provider
Refactored the term indexer_id to series id for tv shows and episode_id for tv episodes
Qualities are now enum classes
Episode statuses are now enum classes
Status / Quality composites are now enum classes
Refactored series provider api to support multiple series providers
Refactored core code to support multiple series providers
Refactored metadata providers config code
Data returned from SR backend to new SR web-ui is json using camelCase naming conventions
Refactored how censored items are generatored and handled for log events
Updated CI script
Fixed seeders / leechers for IPTorrents
parent 5e12bc17
...@@ -6,10 +6,6 @@ stages: ...@@ -6,10 +6,6 @@ stages:
- release_sentry - release_sentry
- release_deploy - release_deploy
services:
- name: docker:dind
command: ["--mtu=1450"]
#review:webpack: #review:webpack:
# stage: review_webpack # stage: review_webpack
# image: # image:
...@@ -120,7 +116,7 @@ release:build:master: ...@@ -120,7 +116,7 @@ release:build:master:
- yarn run build - yarn run build
- python checksum-generator.py - python checksum-generator.py
- git add --all - git add --all
- git commit -m "[TASK] Releasing v$(cat sickrage/version.txt)" - git commit -m "[TASK] Releasing v$(cat sickrage/version.txt) [ci-skip]"
- git fetch . release-$(cat sickrage/version.txt):master - git fetch . release-$(cat sickrage/version.txt):master
- git fetch . release-$(cat sickrage/version.txt):develop - git fetch . release-$(cat sickrage/version.txt):develop
- git tag -a $(cat sickrage/version.txt) -m "Release v$(cat sickrage/version.txt) master" - git tag -a $(cat sickrage/version.txt) -m "Release v$(cat sickrage/version.txt) master"
...@@ -129,7 +125,7 @@ release:build:master: ...@@ -129,7 +125,7 @@ release:build:master:
- bumpversion --allow-dirty patch package.json sickrage/version.txt - bumpversion --allow-dirty patch package.json sickrage/version.txt
- python checksum-generator.py - python checksum-generator.py
- git add --all - git add --all
- git commit -m "[TASK] Bump develop branch to v$(cat sickrage/version.txt)" - git commit -m "[TASK] Bump develop branch to v$(cat sickrage/version.txt) [ci-skip]"
- git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:develop --follow-tags - git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:develop --follow-tags
when: manual when: manual
only: only:
...@@ -138,8 +134,8 @@ release:build:master: ...@@ -138,8 +134,8 @@ release:build:master:
refs: refs:
- branches - branches
- triggers - triggers
variables: # variables:
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Releasing/ # - $CI_COMMIT_MESSAGE =~ /\[TASK\] Releasing/
release:build:develop: release:build:develop:
stage: release_build stage: release_build
...@@ -163,7 +159,7 @@ release:build:develop: ...@@ -163,7 +159,7 @@ release:build:develop:
- git config --global user.email $(git --no-pager show -s --format='%ae' HEAD) - git config --global user.email $(git --no-pager show -s --format='%ae' HEAD)
- git config --global user.name $(git --no-pager show -s --format='%an' HEAD) - git config --global user.name $(git --no-pager show -s --format='%an' HEAD)
- git add --all - git add --all
- git commit -m "[TASK] Pre-Releasing v$(cat sickrage/version.txt)" - git commit -m "[TASK] Pre-Releasing v$(cat sickrage/version.txt) [ci-skip]"
- git tag -a $(cat sickrage/version.txt) -m "Pre-release v$(cat sickrage/version.txt)" - git tag -a $(cat sickrage/version.txt) -m "Pre-release v$(cat sickrage/version.txt)"
- git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:$CI_COMMIT_REF_NAME --follow-tags - git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:$CI_COMMIT_REF_NAME --follow-tags
only: only:
...@@ -172,9 +168,9 @@ release:build:develop: ...@@ -172,9 +168,9 @@ release:build:develop:
refs: refs:
- tags - tags
- triggers - triggers
variables: # variables:
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Pre-Releasing/ # - $CI_COMMIT_MESSAGE =~ /\[TASK\] Pre-Releasing/
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Bump/ # - $CI_COMMIT_MESSAGE =~ /\[TASK\] Bump/
release:sentry:master: release:sentry:master:
stage: release_sentry stage: release_sentry
...@@ -233,9 +229,6 @@ deploy:pypi: ...@@ -233,9 +229,6 @@ deploy:pypi:
deploy:docker:master: deploy:docker:master:
stage: release_deploy stage: release_deploy
variables:
UPSTREAM_BRANCH: master
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
trigger: trigger:
project: sickrage/sickrage-docker project: sickrage/sickrage-docker
branch: master branch: master
...@@ -247,12 +240,9 @@ deploy:docker:master: ...@@ -247,12 +240,9 @@ deploy:docker:master:
deploy:docker:develop: deploy:docker:develop:
stage: release_deploy stage: release_deploy
variables:
UPSTREAM_BRANCH: develop
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
trigger: trigger:
project: sickrage/sickrage-docker project: sickrage/sickrage-docker
branch: master branch: develop
only: only:
- /^[0-9.]+dev[0-9]+$/@SiCKRAGE/sickrage - /^[0-9.]+dev[0-9]+$/@SiCKRAGE/sickrage
except: except:
......
...@@ -13,7 +13,7 @@ It watches for new episodes of your favorite shows, and when they are posted it ...@@ -13,7 +13,7 @@ It watches for new episodes of your favorite shows, and when they are posted it
- Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata - Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata
- Episode status management allows for mass failing seasons/episodes to force retrying - Episode status management allows for mass failing seasons/episodes to force retrying
- DVD Order numbering for returning the results in DVD order instead of Air-By-Date order - DVD Order numbering for returning the results in DVD order instead of Air-By-Date order
- Allows you to choose which indexer to have SickRage search its show info from when importing - Allows you to choose which series provider to have SiCKRAGE search its show info from when importing
- Automatic XEM Scene Numbering/Naming for seasons/episodes - Automatic XEM Scene Numbering/Naming for seasons/episodes
- Available for any platform, uses a simple HTTP interface - Available for any platform, uses a simple HTTP interface
- Specials and multi-episode torrent/nzb support - Specials and multi-episode torrent/nzb support
......
...@@ -16,7 +16,7 @@ Automatic Video Library Manager for TV Shows. It watches for new episodes of you ...@@ -16,7 +16,7 @@ Automatic Video Library Manager for TV Shows. It watches for new episodes of you
- Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata - Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata
- Episode status management allows for mass failing seasons/episodes to force retrying - Episode status management allows for mass failing seasons/episodes to force retrying
- DVD Order numbering for returning the results in DVD order instead of Air-By-Date order - DVD Order numbering for returning the results in DVD order instead of Air-By-Date order
- Allows you to choose which indexer to have SickRage search its show info from when importing - Allows you to choose which series provider to have SiCKRAGE search its show info from when importing
- Automatic XEM Scene Numbering/Naming for seasons/episodes - Automatic XEM Scene Numbering/Naming for seasons/episodes
- Available for any platform, uses a simple HTTP interface - Available for any platform, uses a simple HTTP interface
- Specials and multi-episode torrent/nzb support - Specials and multi-episode torrent/nzb support
......
aenum==2.2.4
alembic==1.4.2 alembic==1.4.2
appdirs==1.4.4 appdirs==1.4.4
APScheduler==3.6.3 APScheduler==3.6.3
...@@ -40,6 +41,7 @@ markdown2==2.3.9 ...@@ -40,6 +41,7 @@ markdown2==2.3.9
MarkupSafe==1.1.1 MarkupSafe==1.1.1
marshmallow==3.8.0 marshmallow==3.8.0
marshmallow-sqlalchemy==0.23.1 marshmallow-sqlalchemy==0.23.1
marshmallow-enum==1.5.1
msgpack==1.0.0 msgpack==1.0.0
MultipartPostHandler==0.1.0 MultipartPostHandler==0.1.0
mutagen==1.45.1 mutagen==1.45.1
...@@ -79,6 +81,7 @@ simplejson==3.17.2 ...@@ -79,6 +81,7 @@ simplejson==3.17.2
six==1.15.0 six==1.15.0
soupsieve==2.0.1 soupsieve==2.0.1
SQLAlchemy==1.3.18 SQLAlchemy==1.3.18
SQLAlchemy-Utils==0.36.8
stevedore==3.2.0 stevedore==3.2.0
subliminal==2.1.0 subliminal==2.1.0
tornado==6.0.4 tornado==6.0.4
......
...@@ -26,6 +26,7 @@ from bencode3 import bdecode, BencodeError, bencode ...@@ -26,6 +26,7 @@ from bencode3 import bdecode, BencodeError, bencode
import sickrage import sickrage
from sickrage.core.websession import WebSession from sickrage.core.websession import WebSession
from sickrage.search_providers import SearchProviderType
_clients = { _clients = {
'utorrent': 'uTorrentAPI', 'utorrent': 'uTorrentAPI',
...@@ -43,10 +44,10 @@ _clients = { ...@@ -43,10 +44,10 @@ _clients = {
class GenericClient(object): class GenericClient(object):
def __init__(self, name, host=None, username=None, password=None): def __init__(self, name, host=None, username=None, password=None):
self.name = name self.name = name
self.username = sickrage.app.config.torrent_username if not username else username self.username = sickrage.app.config.torrent.username if not username else username
self.password = sickrage.app.config.torrent_password if not password else password self.password = sickrage.app.config.torrent.password if not password else password
self.host = sickrage.app.config.torrent_host if not host else host self.host = sickrage.app.config.torrent.host if not host else host
self.rpcurl = sickrage.app.config.torrent_rpcurl self.rpcurl = sickrage.app.config.torrent.rpc_url
self.url = None self.url = None
self.auth = None self.auth = None
...@@ -219,7 +220,7 @@ class TorrentClient(GenericClient): ...@@ -219,7 +220,7 @@ class TorrentClient(GenericClient):
result = self._get_torrent_hash(result) result = self._get_torrent_hash(result)
# convert to magnetic url if result has info hash and is not a private provider # convert to magnetic url if result has info hash and is not a private provider
if sickrage.app.config.torrent_file_to_magnet: if sickrage.app.config.general.torrent_file_to_magnet:
if result.hash and not result.provider.private and not result.url.startswith('magnet'): if result.hash and not result.provider.private and not result.url.startswith('magnet'):
result.url = "magnet:?xt=urn:btih:{}".format(result.hash) result.url = "magnet:?xt=urn:btih:{}".format(result.hash)
...@@ -273,9 +274,9 @@ class NZBClient(GenericClient): ...@@ -273,9 +274,9 @@ class NZBClient(GenericClient):
return False return False
def send_nzb(self, result): def send_nzb(self, result):
if result.resultType == 'nzb': if result.provider_type == SearchProviderType.NZB:
return self._add_nzb_uri(result) return self._add_nzb_uri(result)
elif result.resultType == 'nzbdata': elif result.provider_type == SearchProviderType.NZBDATA:
return self._add_nzb_file(result) return self._add_nzb_file(result)
......
...@@ -43,7 +43,7 @@ class DownloadStationAPI(NZBClient): ...@@ -43,7 +43,7 @@ class DownloadStationAPI(NZBClient):
self.url = self.urls['task'] self.url = self.urls['task']
self.checked_destination = False self.checked_destination = False
self.destination = sickrage.app.config.syno_dsm_path self.destination = sickrage.app.config.synology.path
self.post_task = { self.post_task = {
'method': 'create', 'method': 'create',
...@@ -148,7 +148,7 @@ class DownloadStationAPI(NZBClient): ...@@ -148,7 +148,7 @@ class DownloadStationAPI(NZBClient):
def _check_destination(self): def _check_destination(self):
"""Validate and set nzb destination.""" """Validate and set nzb destination."""
nzb_path = sickrage.app.config.syno_dsm_path nzb_path = sickrage.app.config.synology.path
if not (self.auth or self._get_auth()): if not (self.auth or self._get_auth()):
return False return False
......
...@@ -24,10 +24,11 @@ from http import client ...@@ -24,10 +24,11 @@ from http import client
from xmlrpc.client import ServerProxy, ProtocolError from xmlrpc.client import ServerProxy, ProtocolError
import sickrage import sickrage
from sickrage.core.common import Quality from sickrage.core.common import Qualities
from sickrage.core.helpers import try_int from sickrage.core.helpers import try_int
from sickrage.core.tv.show.helpers import find_show from sickrage.core.tv.show.helpers import find_show
from sickrage.core.websession import WebSession from sickrage.core.websession import WebSession
from sickrage.search_providers import SearchProviderType
class NZBGet(object): class NZBGet(object):
...@@ -40,7 +41,7 @@ class NZBGet(object): ...@@ -40,7 +41,7 @@ class NZBGet(object):
:param proper: True if this is a Proper download, False if not. Defaults to False :param proper: True if this is a Proper download, False if not. Defaults to False
""" """
if sickrage.app.config.nzbget_host is None: if sickrage.app.config.nzbget.host is None:
sickrage.app.log.warning("No NZBGet host found in configuration. Please configure it.") sickrage.app.log.warning("No NZBGet host found in configuration. Please configure it.")
return False return False
...@@ -49,20 +50,20 @@ class NZBGet(object): ...@@ -49,20 +50,20 @@ class NZBGet(object):
addToTop = False addToTop = False
nzbgetprio = 0 nzbgetprio = 0
category = sickrage.app.config.nzbget_category category = sickrage.app.config.nzbget.category
show_object = find_show(nzb.show_id) show_object = find_show(nzb.series_id, nzb.series_provider_id)
if not show_object: if not show_object:
return False return False
if show_object.is_anime: if show_object.is_anime:
category = sickrage.app.config.nzbget_category_anime category = sickrage.app.config.nzbget.category_anime
url = "%(protocol)s://%(username)s:%(password)[email protected]%(host)s/xmlrpc" % { url = "%(protocol)s://%(username)s:%(password)[email protected]%(host)s/xmlrpc" % {
"protocol": 'https' if sickrage.app.config.nzbget_use_https else 'http', "protocol": 'https' if sickrage.app.config.nzbget.use_https else 'http',
"host": sickrage.app.config.nzbget_host, "host": sickrage.app.config.nzbget.host,
"username": sickrage.app.config.nzbget_username, "username": sickrage.app.config.nzbget.username,
"password": sickrage.app.config.nzbget_password "password": sickrage.app.config.nzbget.password
} }
nzbget_rpc_client = ServerProxy(url) nzbget_rpc_client = ServerProxy(url)
...@@ -82,7 +83,7 @@ class NZBGet(object): ...@@ -82,7 +83,7 @@ class NZBGet(object):
sickrage.app.log.warning("NZBGet Protocol Error: " + e.errmsg) sickrage.app.log.warning("NZBGet Protocol Error: " + e.errmsg)
return False return False
show_object = find_show(nzb.show_id) show_object = find_show(nzb.series_id, nzb.series_provider_id)
if not show_object: if not show_object:
return False return False
...@@ -91,27 +92,24 @@ class NZBGet(object): ...@@ -91,27 +92,24 @@ class NZBGet(object):
episode_object = show_object.get_episode(nzb.season, episode_number) episode_object = show_object.get_episode(nzb.season, episode_number)
if dupe_key == "": if dupe_key == "":
if episode_object.show.indexer == 1: dupe_key = f"SiCKRAGE-{episode_object.show.series_provider_id.name}-{episode_object.show.series_id}"
dupe_key = "SiCKRAGE-" + str(episode_object.show.indexer_id)
elif episode_object.show.indexer == 2:
dupe_key = "SiCKRAGE-tvr" + str(episode_object.show.indexer_id)
dupe_key += "-" + str(episode_object.season) + "." + str(episode_object.episode) dupe_key += "-" + str(episode_object.season) + "." + str(episode_object.episode)
if date.today() - episode_object.airdate <= timedelta(days=7): if date.today() - episode_object.airdate <= timedelta(days=7):
addToTop = True addToTop = True
nzbgetprio = sickrage.app.config.nzbget_priority nzbgetprio = sickrage.app.config.nzbget.priority
else: else:
category = sickrage.app.config.nzbget_category_backlog category = sickrage.app.config.nzbget.category_backlog
if show_object.is_anime: if show_object.is_anime:
category = sickrage.app.config.nzbget_category_anime_backlog category = sickrage.app.config.nzbget.category_anime_backlog
if nzb.quality != Quality.UNKNOWN: if nzb.quality != Qualities.UNKNOWN:
dupe_score = nzb.quality * 100 dupe_score = nzb.quality * 100
if proper: if proper:
dupe_score += 10 dupe_score += 10
nzbcontent64 = None nzbcontent64 = None
if nzb.type == "nzbdata": if nzb.provider_type == SearchProviderType.NZBDATA:
data = nzb.extraInfo[0] data = nzb.extraInfo[0]
nzbcontent64 = standard_b64encode(data) nzbcontent64 = standard_b64encode(data)
...@@ -127,7 +125,7 @@ class NZBGet(object): ...@@ -127,7 +125,7 @@ class NZBGet(object):
if nzbcontent64 is not None: if nzbcontent64 is not None:
nzbget_result = nzbget_rpc_client.append(nzb.name + ".nzb", category, addToTop, nzbcontent64) nzbget_result = nzbget_rpc_client.append(nzb.name + ".nzb", category, addToTop, nzbcontent64)
else: else:
if nzb.type == "nzb": if nzb.provider_type == SearchProviderType.NZB:
try: try:
nzbcontent64 = standard_b64encode(WebSession().get(nzb.url).text) nzbcontent64 = standard_b64encode(WebSession().get(nzb.url).text)
except Exception: except Exception:
......
...@@ -26,6 +26,7 @@ import sickrage ...@@ -26,6 +26,7 @@ import sickrage
from sickrage.core.tv.show.helpers import find_show from sickrage.core.tv.show.helpers import find_show
from sickrage.core.websession import WebSession from sickrage.core.websession import WebSession
from sickrage.core.databases.main import MainDB from sickrage.core.databases.main import MainDB
from sickrage.search_providers import SearchProviderType
class SabNZBd(object): class SabNZBd(object):
...@@ -36,46 +37,46 @@ class SabNZBd(object): ...@@ -36,46 +37,46 @@ class SabNZBd(object):
:param nzb: The NZBSearchResult object to send to SAB :param nzb: The NZBSearchResult object to send to SAB
""" """
show_object = find_show(nzb.show_id) show_object = find_show(nzb.series_id, nzb.series_provider_id)
if not show_object: if not show_object:
return False return False
category = sickrage.app.config.sab_category category = sickrage.app.config.sabnzbd.category
if show_object.is_anime: if show_object.is_anime:
category = sickrage.app.config.sab_category_anime category = sickrage.app.config.sabnzbd.category_anime
# if it aired more than 7 days ago, override with the backlog category IDs # if it aired more than 7 days ago, override with the backlog category IDs
for episode__number in nzb.episodes: for episode__number in nzb.episodes:
episode_object = show_object.get_episode(nzb.season, episode__number) episode_object = show_object.get_episode(nzb.season, episode__number)
if datetime.date.today() - episode_object.airdate > datetime.timedelta(days=7): if datetime.date.today() - episode_object.airdate > datetime.timedelta(days=7):
category = sickrage.app.config.sab_category_anime_backlog if episode_object.show.is_anime else sickrage.app.config.sab_category_backlog category = sickrage.app.config.sabnzbd.category_anime_backlog if episode_object.show.is_anime else sickrage.app.config.sabnzbd.category_backlog
# set up a dict with the URL params in it # set up a dict with the URL params in it
params = {'output': 'json'} params = {'output': 'json'}
if sickrage.app.config.sab_username: if sickrage.app.config.sabnzbd.username:
params['ma_username'] = sickrage.app.config.sab_username params['ma_username'] = sickrage.app.config.sabnzbd.username
if sickrage.app.config.sab_password: if sickrage.app.config.sabnzbd.password:
params['ma_password'] = sickrage.app.config.sab_password params['ma_password'] = sickrage.app.config.sabnzbd.password
if sickrage.app.config.sab_apikey: if sickrage.app.config.sabnzbd.apikey:
params['apikey'] = sickrage.app.config.sab_apikey params['apikey'] = sickrage.app.config.sabnzbd.apikey
if category: if category:
params['cat'] = category params['cat'] = category
if nzb.priority: if nzb.priority:
params['priority'] = 2 if sickrage.app.config.sab_forced else 1 params['priority'] = 2 if sickrage.app.config.sabnzbd.forced else 1
sickrage.app.log.info('Sending NZB to SABnzbd') sickrage.app.log.info('Sending NZB to SABnzbd')
url = urljoin(sickrage.app.config.sab_host, 'api') url = urljoin(sickrage.app.config.sabnzbd.host, 'api')
try: try:
jdata = None jdata = None
if nzb.type == 'nzb': if nzb.provider_type == SearchProviderType.NZB:
params['mode'] = 'addurl' params['mode'] = 'addurl'
params['name'] = nzb.url params['name'] = nzb.url
jdata = WebSession().get(url, params=params, verify=False).json() jdata = WebSession().get(url, params=params, verify=False).json()
elif nzb.type == 'nzbdata': elif nzb.provider_type == SearchProviderType.NZBDATA:
params['mode'] = 'addfile' params['mode'] = 'addfile'
multiPartParams = {'nzbfile': (nzb.name + '.nzb', nzb.extraInfo[0])} multiPartParams = {'nzbfile': (nzb.name + '.nzb', nzb.extraInfo[0])}
jdata = WebSession().get(url, params=params, file=multiPartParams, verify=False).json() jdata = WebSession().get(url, params=params, file=multiPartParams, verify=False).json()
...@@ -115,9 +116,9 @@ class SabNZBd(object): ...@@ -115,9 +116,9 @@ class SabNZBd(object):
params = { params = {
'mode': 'auth', 'mode': 'auth',
'output': 'json', 'output': 'json',
'ma_username': sickrage.app.config.sab_username, 'ma_username': sickrage.app.config.sabnzbd.username,
'ma_password': sickrage.app.config.sab_username, 'ma_password': sickrage.app.config.sabnzbd.username,
'apikey': sickrage.app.config.sab_apikey 'apikey': sickrage.app.config.sabnzbd.apikey
} }
url = urljoin(host, 'api') url = urljoin(host, 'api')
......
...@@ -40,7 +40,7 @@ class DelugeAPI(TorrentClient): ...@@ -40,7 +40,7 @@ class DelugeAPI(TorrentClient):
"params": [self.password], "params": [self.password],
"id": 1} "id": 1}
self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent_verify_cert)) self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent.verify_cert))
if not self.response or not self.response.content: if not self.response or not self.response.content:
return None return None
...@@ -57,7 +57,7 @@ class DelugeAPI(TorrentClient): ...@@ -57,7 +57,7 @@ class DelugeAPI(TorrentClient):
"id": 10 "id": 10
} }
self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent_verify_cert)) self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent.verify_cert))
if not self.response or not self.response.content: if not self.response or not self.response.content:
return None return None
...@@ -73,7 +73,7 @@ class DelugeAPI(TorrentClient): ...@@ -73,7 +73,7 @@ class DelugeAPI(TorrentClient):
"id": 11 "id": 11
} }
self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent_verify_cert)) self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent.verify_cert))
if not self.response or not self.response.content: if not self.response or not self.response.content:
return None return None
...@@ -92,7 +92,7 @@ class DelugeAPI(TorrentClient): ...@@ -92,7 +92,7 @@ class DelugeAPI(TorrentClient):
"id": 11 "id": 11
} }
self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent_verify_cert)) self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent.verify_cert))
if not self.response: if not self.response:
return None return None
...@@ -102,7 +102,7 @@ class DelugeAPI(TorrentClient): ...@@ -102,7 +102,7 @@ class DelugeAPI(TorrentClient):
"id": 10 "id": 10
} }
self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent_verify_cert)) self.response = self.session.post(self.url, json=post_data, verify=bool(sickrage.app.config.torrent.verify_cert))
if not self.response or not self.response.content: if not self.response or not self.response.content:
return None return None
...@@ -140,12 +140,12 @@ class DelugeAPI(TorrentClient): ...@@ -140,12 +140,12 @@ class DelugeAPI(TorrentClient):
return self.response.json()['result'] return self.response.json()['result']
def _set_torrent_label(self, result):