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:
- release_sentry
- release_deploy
services:
- name: docker:dind
command: ["--mtu=1450"]
#review:webpack:
# stage: review_webpack
# image:
......@@ -120,7 +116,7 @@ release:build:master:
- yarn run build
- python checksum-generator.py
- 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):develop
- git tag -a $(cat sickrage/version.txt) -m "Release v$(cat sickrage/version.txt) master"
......@@ -129,7 +125,7 @@ release:build:master:
- bumpversion --allow-dirty patch package.json sickrage/version.txt
- python checksum-generator.py
- 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
when: manual
only:
......@@ -138,8 +134,8 @@ release:build:master:
refs:
- branches
- triggers
variables:
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Releasing/
# variables:
# - $CI_COMMIT_MESSAGE =~ /\[TASK\] Releasing/
release:build:develop:
stage: release_build
......@@ -163,7 +159,7 @@ release:build:develop:
- 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 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 push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:$CI_COMMIT_REF_NAME --follow-tags
only:
......@@ -172,9 +168,9 @@ release:build:develop:
refs:
- tags
- triggers
variables:
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Pre-Releasing/
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Bump/
# variables:
# - $CI_COMMIT_MESSAGE =~ /\[TASK\] Pre-Releasing/
# - $CI_COMMIT_MESSAGE =~ /\[TASK\] Bump/
release:sentry:master:
stage: release_sentry
......@@ -233,9 +229,6 @@ deploy:pypi:
deploy:docker:master:
stage: release_deploy
variables:
UPSTREAM_BRANCH: master
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
trigger:
project: sickrage/sickrage-docker
branch: master
......@@ -247,12 +240,9 @@ deploy:docker:master:
deploy:docker:develop:
stage: release_deploy
variables:
UPSTREAM_BRANCH: develop
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
trigger:
project: sickrage/sickrage-docker
branch: master
branch: develop
only:
- /^[0-9.]+dev[0-9]+$/@SiCKRAGE/sickrage
except:
......
......@@ -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
- 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
- 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
- Available for any platform, uses a simple HTTP interface
- 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
- Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata
- 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
- 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
- Available for any platform, uses a simple HTTP interface
- Specials and multi-episode torrent/nzb support
......
aenum==2.2.4
alembic==1.4.2
appdirs==1.4.4
APScheduler==3.6.3
......@@ -40,6 +41,7 @@ markdown2==2.3.9
MarkupSafe==1.1.1
marshmallow==3.8.0
marshmallow-sqlalchemy==0.23.1
marshmallow-enum==1.5.1
msgpack==1.0.0
MultipartPostHandler==0.1.0
mutagen==1.45.1
......@@ -79,6 +81,7 @@ simplejson==3.17.2
six==1.15.0
soupsieve==2.0.1
SQLAlchemy==1.3.18
SQLAlchemy-Utils==0.36.8
stevedore==3.2.0
subliminal==2.1.0
tornado==6.0.4
......
......@@ -26,6 +26,7 @@ from bencode3 import bdecode, BencodeError, bencode
import sickrage
from sickrage.core.websession import WebSession
from sickrage.search_providers import SearchProviderType
_clients = {
'utorrent': 'uTorrentAPI',
......@@ -43,10 +44,10 @@ _clients = {
class GenericClient(object):
def __init__(self, name, host=None, username=None, password=None):
self.name = name
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.host = sickrage.app.config.torrent_host if not host else host
self.rpcurl = sickrage.app.config.torrent_rpcurl
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.host = sickrage.app.config.torrent.host if not host else host
self.rpcurl = sickrage.app.config.torrent.rpc_url
self.url = None
self.auth = None
......@@ -219,7 +220,7 @@ class TorrentClient(GenericClient):
result = self._get_torrent_hash(result)
# 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'):
result.url = "magnet:?xt=urn:btih:{}".format(result.hash)
......@@ -273,9 +274,9 @@ class NZBClient(GenericClient):
return False
def send_nzb(self, result):
if result.resultType == 'nzb':
if result.provider_type == SearchProviderType.NZB:
return self._add_nzb_uri(result)
elif result.resultType == 'nzbdata':
elif result.provider_type == SearchProviderType.NZBDATA:
return self._add_nzb_file(result)
......
......@@ -43,7 +43,7 @@ class DownloadStationAPI(NZBClient):
self.url = self.urls['task']
self.checked_destination = False
self.destination = sickrage.app.config.syno_dsm_path
self.destination = sickrage.app.config.synology.path
self.post_task = {
'method': 'create',
......@@ -148,7 +148,7 @@ class DownloadStationAPI(NZBClient):
def _check_destination(self):
"""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()):
return False
......
......@@ -24,10 +24,11 @@ from http import client
from xmlrpc.client import ServerProxy, ProtocolError
import sickrage
from sickrage.core.common import Quality
from sickrage.core.common import Qualities
from sickrage.core.helpers import try_int
from sickrage.core.tv.show.helpers import find_show
from sickrage.core.websession import WebSession
from sickrage.search_providers import SearchProviderType
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
"""
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.")
return False
......@@ -49,20 +50,20 @@ class NZBGet(object):
addToTop = False
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:
return False
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" % {
"protocol": 'https' if sickrage.app.config.nzbget_use_https else 'http',
"host": sickrage.app.config.nzbget_host,
"username": sickrage.app.config.nzbget_username,
"password": sickrage.app.config.nzbget_password
"protocol": 'https' if sickrage.app.config.nzbget.use_https else 'http',
"host": sickrage.app.config.nzbget.host,
"username": sickrage.app.config.nzbget.username,
"password": sickrage.app.config.nzbget.password
}
nzbget_rpc_client = ServerProxy(url)
......@@ -82,7 +83,7 @@ class NZBGet(object):
sickrage.app.log.warning("NZBGet Protocol Error: " + e.errmsg)
return False
show_object = find_show(nzb.show_id)
show_object = find_show(nzb.series_id, nzb.series_provider_id)
if not show_object:
return False
......@@ -91,27 +92,24 @@ class NZBGet(object):
episode_object = show_object.get_episode(nzb.season, episode_number)
if dupe_key == "":
if episode_object.show.indexer == 1:
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 = f"SiCKRAGE-{episode_object.show.series_provider_id.name}-{episode_object.show.series_id}"
dupe_key += "-" + str(episode_object.season) + "." + str(episode_object.episode)
if date.today() - episode_object.airdate <= timedelta(days=7):
addToTop = True
nzbgetprio = sickrage.app.config.nzbget_priority
nzbgetprio = sickrage.app.config.nzbget.priority
else:
category = sickrage.app.config.nzbget_category_backlog
category = sickrage.app.config.nzbget.category_backlog
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
if proper:
dupe_score += 10
nzbcontent64 = None
if nzb.type == "nzbdata":
if nzb.provider_type == SearchProviderType.NZBDATA:
data = nzb.extraInfo[0]
nzbcontent64 = standard_b64encode(data)
......@@ -127,7 +125,7 @@ class NZBGet(object):
if nzbcontent64 is not None:
nzbget_result = nzbget_rpc_client.append(nzb.name + ".nzb", category, addToTop, nzbcontent64)
else:
if nzb.type == "nzb":
if nzb.provider_type == SearchProviderType.NZB:
try:
nzbcontent64 = standard_b64encode(WebSession().get(nzb.url).text)
except Exception:
......
......@@ -26,6 +26,7 @@ import sickrage
from sickrage.core.tv.show.helpers import find_show
from sickrage.core.websession import WebSession
from sickrage.core.databases.main import MainDB
from sickrage.search_providers import SearchProviderType
class SabNZBd(object):
......@@ -36,46 +37,46 @@ class SabNZBd(object):
: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:
return False
category = sickrage.app.config.sab_category
category = sickrage.app.config.sabnzbd.category
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
for episode__number in nzb.episodes:
episode_object = show_object.get_episode(nzb.season, episode__number)
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
params = {'output': 'json'}
if sickrage.app.config.sab_username:
params['ma_username'] = sickrage.app.config.sab_username
if sickrage.app.config.sab_password:
params['ma_password'] = sickrage.app.config.sab_password
if sickrage.app.config.sab_apikey:
params['apikey'] = sickrage.app.config.sab_apikey
if sickrage.app.config.sabnzbd.username:
params['ma_username'] = sickrage.app.config.sabnzbd.username
if sickrage.app.config.sabnzbd.password:
params['ma_password'] = sickrage.app.config.sabnzbd.password
if sickrage.app.config.sabnzbd.apikey:
params['apikey'] = sickrage.app.config.sabnzbd.apikey
if category:
params['cat'] = category
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')
url = urljoin(sickrage.app.config.sab_host, 'api')
url = urljoin(sickrage.app.config.sabnzbd.host, 'api')
try:
jdata = None
if nzb.type == 'nzb':
if nzb.provider_type == SearchProviderType.NZB:
params['mode'] = 'addurl'
params['name'] = nzb.url
jdata = WebSession().get(url, params=params, verify=False).json()
elif nzb.type == 'nzbdata':
elif nzb.provider_type == SearchProviderType.NZBDATA:
params['mode'] = 'addfile'
multiPartParams = {'nzbfile': (nzb.name + '.nzb', nzb.extraInfo[0])}
jdata = WebSession().get(url, params=params, file=multiPartParams, verify=False).json()
......@@ -115,9 +116,9 @@ class SabNZBd(object):
params = {
'mode': 'auth',
'output': 'json',
'ma_username': sickrage.app.config.sab_username,
'ma_password': sickrage.app.config.sab_username,
'apikey': sickrage.app.config.sab_apikey
'ma_username': sickrage.app.config.sabnzbd.username,
'ma_password': sickrage.app.config.sabnzbd.username,
'apikey': sickrage.app.config.sabnzbd.apikey
}
url = urljoin(host, 'api')
......
......@@ -40,7 +40,7 @@ class DelugeAPI(TorrentClient):
"params": [self.password],
"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:
return None
......@@ -57,7 +57,7 @@ class DelugeAPI(TorrentClient):
"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:
return None
......@@ -73,7 +73,7 @@ class DelugeAPI(TorrentClient):
"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:
return None
......@@ -92,7 +92,7 @@ class DelugeAPI(TorrentClient):
"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:
return None
......@@ -102,7 +102,7 @@ class DelugeAPI(TorrentClient):
"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:
return None
......@@ -140,12 +140,12 @@ class DelugeAPI(TorrentClient):
return self.response.json()['result']
def _set_torrent_label(self, result):
label = sickrage.app.config.torrent_label
label = sickrage.app.config.torrent.label
tv_show = find_show(result.show_id)
tv_show = find_show(result.series_id, result.series_provider_id)
if tv_show.is_anime:
label = sickrage.app.config.torrent_label_anime
label = sickrage.app.config.torrent.label_anime
if ' ' in label:
sickrage.app.log.warning(self.name + ': Invalid label. Label must not contain a space')
......@@ -206,7 +206,7 @@ class DelugeAPI(TorrentClient):
return True
def _set_torrent_path(self, result):
if sickrage.app.config.torrent_path:
if sickrage.app.config.torrent.path:
post_data = {"method": "core.set_torrent_move_completed",
"params": [result.hash, True],
"id": 7}
......@@ -214,7 +214,7 @@ class DelugeAPI(TorrentClient):
self._request(method='post', json=post_data)
post_data = {"method": "core.set_torrent_move_completed_path",
"params": [result.hash, sickrage.app.config.torrent_path],
"params": [result.hash, sickrage.app.config.torrent.path],
"id": 8}
self._request(method='post', json=post_data)
......@@ -224,7 +224,7 @@ class DelugeAPI(TorrentClient):
return True
def _set_torrent_pause(self, result):
if sickrage.app.config.torrent_paused:
if sickrage.app.config.torrent.paused:
post_data = {"method": "core.pause_torrent",
"params": [[result.hash]],
"id": 9}
......
......@@ -57,7 +57,7 @@ class DelugeDAPI(TorrentClient):
# label = sickrage.TORRENT_LABEL_ANIME
options = {
'add_paused': sickrage.app.config.torrent_paused
'add_paused': sickrage.app.config.torrent.paused
}
remote_torrent = self.drpc.add_torrent_magnet(result.url, options, result.hash)
......@@ -79,7 +79,7 @@ class DelugeDAPI(TorrentClient):
return None
options = {
'add_paused': sickrage.app.config.torrent_paused
'add_paused': sickrage.app.config.torrent.paused
}
remote_torrent = self.drpc.add_torrent_file(result.name + '.torrent', result.content, options, result.hash)
......@@ -92,12 +92,12 @@ class DelugeDAPI(TorrentClient):
return remote_torrent
def _set_torrent_label(self, result):
label = sickrage.app.config.torrent_label
label = sickrage.app.config.torrent.label
tv_show = find_show(result.show_id)
tv_show = find_show(result.series_id, result.series_provider_id)
if tv_show.is_anime:
label = sickrage.app.config.torrent_label_anime
label = sickrage.app.config.torrent.label_anime
if ' ' in label:
sickrage.app.log.warning(self.name + ': Invalid label. Label must not contain a space')
......@@ -121,14 +121,14 @@ class DelugeDAPI(TorrentClient):
def _set_torrent_path(self, result):
path = sickrage.app.config.torrent_path
path = sickrage.app.config.torrent.path
if path:
return self.drpc.set_torrent_path(result.hash, path)
return True
def _set_torrent_pause(self, result):
if sickrage.app.config.torrent_paused:
if sickrage.app.config.torrent.paused:
return self.drpc.pause_torrent(result.hash)
return True
......
......@@ -45,7 +45,7 @@ class DownloadStationAPI(TorrentClient):
self.url = self.urls['task']
self.checked_destination = False
self.destination = sickrage.app.config.torrent_path
self.destination = sickrage.app.config.torrent.path
self.post_task = {
'method': 'create',
......@@ -123,7 +123,7 @@ class DownloadStationAPI(TorrentClient):
'format': 'cookie'
}
self.response = self.session.get(self.urls['auth'], params=params, verify=bool(sickrage.app.config.torrent_verify_cert))
self.response = self.session.get(self.urls['auth'], params=params, verify=bool(sickrage.app.config.torrent.verify_cert))
if not self.response:
self.session.cookies.clear()
self.auth = False
......@@ -148,7 +148,7 @@ class DownloadStationAPI(TorrentClient):
def _check_destination(self):
"""Validate and set torrent destination."""
torrent_path = sickrage.app.config.torrent_path
torrent_path = sickrage.app.config.torrent.path
if not (self.auth or self._get_auth()):
return False
......
......@@ -33,7 +33,7 @@ class mlnetAPI(TorrentClient):
def _get_auth(self):
self.auth = None
self.response = self.session.get(self.host, auth=(self.username, self.password), verify=bool(sickrage.app.config.torrent_verify_cert))
self.response = self.session.get(self.host, auth=(self.username, self.password), verify=bool(sickrage.app.config.torrent.verify_cert))
if self.response and self.response.text:
self.auth = self.response.text
......
......@@ -49,11 +49,11 @@ class PutioAPI(TorrentClient):
self.auth = None
response = self.session.post(self.url, data=post_data, verify=bool(sickrage.app.config.torrent_verify_cert))
response = self.session.post(self.url, data=post_data, verify=bool(sickrage.app.config.torrent.verify_cert))
if not response:
return None
response = self.session.get(response.headers['location'], verify=bool(sickrage.app.config.torrent_verify_cert))
response = self.session.get(response.headers['location'], verify=bool(sickrage.app.config.torrent.verify_cert))
if not response:
return None
......
......@@ -38,7 +38,7 @@ class QBittorrentAPI(TorrentClient):
version = (1, 0, 0)
url = urljoin(self.host, 'api/v2/app/webapiVersion')
response = self.session.get(url, verify=sickrage.app.config.torrent_verify_cert)
response = self.session.get(url, verify=sickrage.app.config.torrent.verify_cert)
try:
if response and response.text:
......@@ -48,7 +48,7 @@ class QBittorrentAPI(TorrentClient):
status_code = response.status_code
if status_code == 404:
url = urljoin(self.host, 'version/api')
response = self.session.get(url, verify=sickrage.app.config.torrent_verify_cert)
response = self.session.get(url, verify=sickrage.app.config.torrent.verify_cert)
if response and response.text:
version = int(response.text)
version = (1, version % 100, 0)
......@@ -66,7 +66,7 @@ class QBittorrentAPI(TorrentClient):
}
url = urljoin(self.host, 'api/v2/auth/login')
self.response = self.session.post(url, data=data, verify=sickrage.app.config.torrent_verify_cert)
self.response = self.session.post(url, data=data, verify=sickrage.app.config.torrent.verify_cert)
if self.response and self.response.text and not self.response.text == 'Fails.':
self.session.cookies = self.response.cookies
self.auth = True
......@@ -74,7 +74,7 @@ class QBittorrentAPI(TorrentClient):
status_code = self.response.status_code
if status_code == 404:
url = urljoin(self.host, 'login')
self.response = self.session.post(url, data=data, verify=sickrage.app.config.torrent_verify_cert)
self.response = self.session.post(url, data=data, verify=sickrage.app.config.torrent.verify_cert)
if self.response:
self.session.cookies = self.response.cookies
self.auth = True
......@@ -87,7 +87,7 @@ class QBittorrentAPI(TorrentClient):
return self.auth
def _set_torrent_label(self, result):
label = sickrage.app.config.torrent_label_anime if find_show(result.show_id).is_anime else sickrage.app.config.torrent_label
label = sickrage.app.config.torrent.label_anime if find_show(result.series_id, result.series_provider_id).is_anime else sickrage.app.config.torrent.label
if not label:
return True
......@@ -125,7 +125,7 @@ class QBittorrentAPI(TorrentClient):
def _set_torrent_pause(self, result):
command = 'api/v2/torrents' if