Commit 21800455 authored by echel0n's avatar echel0n

Merge branch 'release/10.0.8'

parents 0eca5abc 52726b68
......@@ -2,7 +2,17 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [v10.0.7](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.6...v10.0.7)
#### [v10.0.8](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.7...v10.0.8)
- Removed ability to set web host from settings in UI, constrained to only setting from cli. [`c17dc55`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/c17dc551de4d6df4f4b20b96fb3d94bba086966e)
- Removed IRC from main layout [`87a989d`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/87a989dc9f05308ea9fd6c23aad53d0249219624)
- Fixed issue with provider options not appearing in settings [`256e1df`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/256e1df2636a8810cfa85120ce323f5967a7e4da)
- Replaced get_lan_ip with get_internal_ip [`fa55c2c`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/fa55c2c97f156755ece800e46632bb7feb36977b)
- Fixed `invalid literal for int() with base 10` when attempting to mass edit default episode statuses [`a7dd0d7`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/a7dd0d7d8999ca6554a33dc5d4b3a3b0c4ca2033)
#### [10.0.7](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.6...10.0.7)
> 15 January 2021
#### [10.0.6](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.5...10.0.6)
......
{
"name": "sickrage",
"version": "10.0.7",
"version": "10.0.8",
"private": true,
"repository": {
"type": "git",
......
[bumpversion]
current_version = 10.0.7
current_version = 10.0.8
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
......
This diff is collapsed.
......@@ -56,8 +56,8 @@ from sickrage.core.databases.cache import CacheDB
from sickrage.core.databases.config import ConfigDB, CustomStringEncryptedType
from sickrage.core.databases.main import MainDB
from sickrage.core.enums import MultiEpNaming, DefaultHomePage, NzbMethod, TorrentMethod, CheckPropersInterval
from sickrage.core.helpers import generate_secret, make_dir, get_lan_ip, restore_app_data, get_disk_space_usage, get_free_space, launch_browser, \
torrent_webui_url, encryption, md5_file_hash, flatten
from sickrage.core.helpers import generate_secret, make_dir, restore_app_data, get_disk_space_usage, get_free_space, launch_browser, torrent_webui_url, \
encryption, md5_file_hash, flatten
from sickrage.core.logger import Logger
from sickrage.core.nameparser.validator import check_force_season_folders
from sickrage.core.processors import auto_postprocessor
......@@ -332,8 +332,6 @@ class Core(object):
self.config.general.web_port = self.web_port
if self.web_root:
self.config.general.web_root = self.web_root
if self.web_host:
self.config.general.web_host = self.web_host
# set language
change_gui_lang(self.config.gui.gui_lang)
......
......@@ -674,7 +674,6 @@ class Config(object):
field_type=str)
self.general.git_reset = self._get_config_file_value(config_object, 'General', 'git_reset', default=self.general.git_reset, field_type=bool)
self.general.web_port = self._get_config_file_value(config_object, 'General', 'web_port', default=self.general.web_port, field_type=int)
self.general.web_host = self._get_config_file_value(config_object, 'General', 'web_host', default=self.general.web_host, field_type=str)
self.general.web_log = self._get_config_file_value(config_object, 'General', 'web_log', default=self.general.web_log, field_type=str)
self.general.web_external_port = self._get_config_file_value(config_object, 'General', 'web_external_port', default=self.general.web_external_port,
field_type=int)
......
......@@ -213,7 +213,7 @@ class SRDatabase(object):
table = metadata.tables.get('series_provider_mapping')
table.drop(self.engine)
sickrage.app.log.info(f'Backing up {self.name} database')
sickrage.app.log.info(f'Backing up {self.name} database v{db_version}')
self.backup(backup_filename)
sickrage.app.log.info(f'Upgrading {self.name} database to v{alembic_version}')
......
......@@ -35,7 +35,7 @@ from sickrage.core.databases import SRDatabaseBase, SRDatabase, IntFlag
from sickrage.core.enums import DefaultHomePage, MultiEpNaming, CpuPreset, CheckPropersInterval, \
FileTimestampTimezone, ProcessMethod, NzbMethod, TorrentMethod, SearchFormat, UserPermission, PosterSortDirection, HomeLayout, PosterSortBy, \
HistoryLayout, TimezoneDisplay, UITheme, TraktAddMethod, SeriesProviderID
from sickrage.core.helpers import generate_api_key, generate_secret, get_lan_ip
from sickrage.core.helpers import generate_api_key, generate_secret
from sickrage.core.tv.show.coming_episodes import ComingEpsLayout, ComingEpsSortBy
from sickrage.notification_providers.nmjv2 import NMJv2Location
from sickrage.search_providers import SearchProviderType
......@@ -212,7 +212,6 @@ class ConfigDB(SRDatabase):
naming_custom_anime = Column(Boolean, default=False)
naming_anime_pattern = Column(Text, default='Season %0S/%SN - S%0SE%0E - %EN')
randomize_providers = Column(Boolean, default=False)
web_host = Column(Text, default='0.0.0.0')
process_automatically = Column(Boolean, default=False)
git_path = Column(Text, default='git')
sync_files = Column(Text, default=','.join(['!sync', 'lftp-pget-status', 'part', 'bts', '!qb']))
......
"""Initial migration
Revision ID: 1
Revises:
Create Date: 2017-12-29 14:39:27.854291
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = '2'
down_revision = '1'
def upgrade():
with op.batch_alter_table('general') as batch_op:
batch_op.drop_column('web_host')
def downgrade():
pass
......@@ -24,9 +24,4 @@ def upgrade():
def downgrade():
conn = op.get_bind()
meta = sa.MetaData(bind=conn)
tv_shows = sa.Table('tv_shows', meta, autoload=True)
if hasattr(tv_shows.c, 'last_backlog_search'):
op.drop_column('tv_shows', 'last_backlog_search')
pass
......@@ -23,9 +23,4 @@ def upgrade():
def downgrade():
conn = op.get_bind()
meta = sa.MetaData(bind=conn)
tv_shows = sa.Table('tv_shows', meta, autoload=True)
if hasattr(tv_shows.c, 'last_proper_search'):
op.drop_column('tv_shows', 'last_proper_search')
pass
......@@ -23,9 +23,4 @@ def upgrade():
def downgrade():
conn = op.get_bind()
meta = sa.MetaData(bind=conn)
history = sa.Table('history', meta, autoload=True)
if hasattr(history.c, 'release_group'):
op.drop_column('history', 'release_group')
pass
......@@ -26,12 +26,4 @@ def upgrade():
def downgrade():
conn = op.get_bind()
meta = sa.MetaData(bind=conn)
tv_shows = sa.Table('tv_shows', meta, autoload=True)
if hasattr(tv_shows.c, 'scene_exceptions'):
op.drop_column('tv_shows', 'scene_exceptions')
if hasattr(tv_shows.c, 'last_scene_exceptions_refresh'):
op.drop_column('tv_shows', 'last_scene_exceptions_refresh')
pass
......@@ -809,13 +809,6 @@ def create_https_certificates(ssl_cert, ssl_key):
return True
def get_lan_ip():
"""Return IP of system."""
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('8.8.8.8', 1))
return s.getsockname()[0]
def anon_url(*url):
"""
Return a URL string consisting of the Anonymous redirect URL and an arbitrary number of values appended.
......@@ -1587,8 +1580,7 @@ def torrent_webui_url(reset=False):
sickrage.app.client_web_urls['torrent'] = ''
return sickrage.app.client_web_urls['torrent']
torrent_ui_url = re.sub('localhost|127.0.0.1', sickrage.app.config.general.web_host or get_lan_ip(),
sickrage.app.config.torrent.host or '', re.I)
torrent_ui_url = re.sub('localhost|127.0.0.1', sickrage.app.web_host or get_internal_ip(), sickrage.app.config.torrent.host or '', re.I)
def test_exists(url):
try:
......
......@@ -1354,7 +1354,7 @@ class TVShow(object):
else:
self.scene_exceptions = set(self.scene_exceptions + scene_exceptions['data']['exceptions'].split(','))
if get_anidb and self.is_anime and self.series_provider_id == 1:
if get_anidb and self.is_anime and self.series_provider_id == SeriesProviderID.THETVDB:
try:
sickrage.app.log.info("Retrieving AniDB scene exceptions for show: {}".format(self.name))
anime = Anime(None, name=self.name, tvdbid=self.series_id, autoCorrectName=True)
......
......@@ -27,7 +27,7 @@ from urllib.parse import urlparse
import upnpclient
import sickrage
from sickrage.core.helpers import get_lan_ip
from sickrage.core.helpers import get_internal_ip
class UPNPClient(object):
......@@ -91,7 +91,7 @@ class UPNPClient(object):
NewExternalPort=sickrage.app.config.general.web_external_port,
NewProtocol=protocol,
NewInternalPort=sickrage.app.config.general.web_port,
NewInternalClient=sickrage.app.config.general.web_host,
NewInternalClient=sickrage.app.web_host or '0.0.0.0',
NewEnabled='1',
NewPortMappingDescription=description,
NewLeaseDuration=self._nat_portmap_lifetime,
......@@ -129,7 +129,7 @@ class UPNPClient(object):
return device
def _find_internal_ip_on_device_network(self, upnp_dev):
lan_ip = get_lan_ip()
lan_ip = get_internal_ip()
parsed_url = urlparse(upnp_dev.location)
upnp_dev_net = ipaddress.ip_network(parsed_url.hostname + '/24', strict=False)
......
......@@ -33,7 +33,7 @@ from tornado.ioloop import IOLoop
from tornado.web import Application, RedirectHandler, StaticFileHandler
import sickrage
from sickrage.core.helpers import create_https_certificates, get_lan_ip, launch_browser
from sickrage.core.helpers import create_https_certificates, launch_browser, get_internal_ip
from sickrage.core.webserver.handlers.account import AccountLinkHandler, AccountUnlinkHandler, AccountIsLinkedHandler
from sickrage.core.webserver.handlers.announcements import AnnouncementsHandler, MarkAnnouncementSeenHandler, AnnouncementCountHandler
from sickrage.core.webserver.handlers.api import ApiSwaggerDotJsonHandler, ApiPingHandler
......@@ -83,7 +83,6 @@ from sickrage.core.webserver.handlers.home.add_shows import HomeAddShowsHandler,
MassAddTableHandler, NewShowHandler, TraktShowsHandler, PopularShowsHandler, AddShowToBlacklistHandler, \
ExistingShowsHandler, AddShowByIDHandler, AddNewShowHandler, AddExistingShowsHandler
from sickrage.core.webserver.handlers.home.postprocess import HomePostProcessHandler, HomeProcessEpisodeHandler
from sickrage.core.webserver.handlers.irc import IRCHandler
from sickrage.core.webserver.handlers.login import LoginHandler
from sickrage.core.webserver.handlers.logout import LogoutHandler
from sickrage.core.webserver.handlers.logs import LogsHandler, LogsClearAllHanlder, LogsViewHandler, \
......@@ -325,7 +324,6 @@ class WebServer(threading.Thread):
(fr'{sickrage.app.config.general.web_root}/history(/?)', HistoryHandler),
(fr'{sickrage.app.config.general.web_root}/history/clear(/?)', HistoryClearHandler),
(fr'{sickrage.app.config.general.web_root}/history/trim(/?)', HistoryTrimHandler),
(fr'{sickrage.app.config.general.web_root}/irc(/?)', IRCHandler),
(fr'{sickrage.app.config.general.web_root}/logs(/?)', LogsHandler),
(fr'{sickrage.app.config.general.web_root}/logs/errorCount(/?)', ErrorCountHandler),
(fr'{sickrage.app.config.general.web_root}/logs/warningCount(/?)', WarningCountHandler),
......@@ -492,7 +490,7 @@ class WebServer(threading.Thread):
self.server = HTTPServer(self.app, ssl_options=ssl_ctx, xheaders=sickrage.app.config.general.handle_reverse_proxy)
try:
self.server.listen(sickrage.app.config.general.web_port, sickrage.app.config.general.web_host)
self.server.listen(sickrage.app.config.general.web_port, sickrage.app.web_host)
except socket.error as e:
sickrage.app.log.warning(e.strerror)
raise SystemExit
......@@ -501,7 +499,7 @@ class WebServer(threading.Thread):
if not sickrage.app.no_launch and sickrage.app.config.general.launch_browser:
sickrage.app.scheduler.add_job(launch_browser,
args=[('http', 'https')[sickrage.app.config.general.enable_https],
(sickrage.app.config.general.web_host, get_lan_ip())[sickrage.app.config.general.web_host == '0.0.0.0'],
(get_internal_ip(), sickrage.app.web_host)[sickrage.app.web_host != ''],
sickrage.app.config.general.web_port])
sickrage.app.log.info("SiCKRAGE :: STARTED")
......@@ -509,8 +507,8 @@ class WebServer(threading.Thread):
sickrage.app.log.info(f"SiCKRAGE :: CONFIG VERSION:[v{sickrage.app.config.db.version}]")
sickrage.app.log.info(f"SiCKRAGE :: DATABASE VERSION:[v{sickrage.app.main_db.version}]")
sickrage.app.log.info(f"SiCKRAGE :: DATABASE TYPE:[{sickrage.app.db_type}]")
sickrage.app.log.info(
f"SiCKRAGE :: URL:[{('http', 'https')[sickrage.app.config.general.enable_https]}://{(sickrage.app.config.general.web_host, get_lan_ip())[sickrage.app.config.general.web_host == '0.0.0.0']}:{sickrage.app.config.general.web_port}/{sickrage.app.config.general.web_root}]")
sickrage.app.log.info(f"SiCKRAGE :: URL:[{('http', 'https')[sickrage.app.config.general.enable_https]}://{(get_internal_ip(), sickrage.app.web_host)[sickrage.app.web_host != '']}:{sickrage.app.config.general.web_port}/{sickrage.app.config.general.web_root}]")
self.io_loop.start()
......
......@@ -221,7 +221,6 @@ class SaveGeneralHandler(BaseHandler):
sickrage.app.config.general.strip_special_file_bits = checkbox_to_value(strip_special_file_bits)
sickrage.app.config.general.web_root = web_root
sickrage.app.config.general.web_host = web_host
sickrage.app.config.general.ip_whitelist_enabled = checkbox_to_value(ip_whitelist_enabled)
sickrage.app.config.general.ip_whitelist_localhost_enabled = checkbox_to_value(ip_whitelist_localhost_enabled)
......
......@@ -136,6 +136,7 @@ class SaveProvidersHandler(BaseHandler):
elif provider_obj.provider_type in [SearchProviderType.NZB, SearchProviderType.NEWZNAB]:
provider_obj.username = self.get_argument(providerID + '_username', '').strip()
provider_obj.api_key = self.get_argument(providerID + '_api_key', '').strip()
provider_obj.key = self.get_argument(providerID + '_key', '').strip()
custom_settings = {
'minseed': int(self.get_argument(providerID + '_minseed', None) or 0),
......
# ##############################################################################
# Author: echel0n <[email protected]>
# URL: https://sickrage.ca/
# Git: https://git.sickrage.ca/SiCKRAGE/sickrage.git
# -
# This file is part of SiCKRAGE.
# -
# SiCKRAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# -
# SiCKRAGE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# -
# You should have received a copy of the GNU General Public License
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ##############################################################################
from tornado.web import authenticated
from sickrage.core.webserver.handlers.base import BaseHandler
class IRCHandler(BaseHandler):
@authenticated
def get(self, *args, **kwargs):
return self.render('irc.mako',
topmenu="system",
header="IRC",
title="IRC",
controller='root',
action='irc')
......@@ -21,7 +21,7 @@
import sentry_sdk
from jose import ExpiredSignatureError
from jose import ExpiredSignatureError, JWTError
import sickrage
from sickrage.core.enums import UserPermission
......@@ -60,6 +60,9 @@ class LoginHandler(BaseHandler):
except ExpiredSignatureError:
self.set_status(401)
return self.write({'error': 'Token expired'})
except JWTError as e:
self.set_status(401)
return self.write({'error': f'Improper JWT token supplied, {e!r}'})
if not sickrage.app.config.user.sub_id:
sickrage.app.config.user.sub_id = decoded_token.get('sub')
......
......@@ -890,7 +890,7 @@ class MassEditHandler(BaseHandler):
if default_ep_status == 'keep':
new_default_ep_status = show_obj.default_ep_status
else:
new_default_ep_status = int(default_ep_status)
new_default_ep_status = default_ep_status
if anime == 'keep':
new_anime = show_obj.anime
......@@ -918,14 +918,11 @@ class MassEditHandler(BaseHandler):
if quality_preset == 'keep':
any_qualities, best_qualities = Quality.split_quality(show_obj.quality)
elif try_int(quality_preset, None):
best_qualities = []
status, message = edit_show(series_id=curShow, location=new_show_dir, any_qualities=any_qualities, best_qualities=best_qualities,
exceptions_list=[],
default_ep_status=new_default_ep_status, skip_downloaded=new_skip_downloaded, flatten_folders=new_flatten_folders,
paused=new_paused, search_format=new_search_format, subtitles=new_subtitles, anime=new_anime,
scene=new_scene, direct_call=True)
exceptions_list=[], default_ep_status=new_default_ep_status, skip_downloaded=new_skip_downloaded,
flatten_folders=new_flatten_folders, paused=new_paused, search_format=new_search_format, subtitles=new_subtitles,
anime=new_anime, scene=new_scene, direct_call=True)
if status is False:
cur_warnings += json_decode(message)['warnings']
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -729,30 +729,6 @@ c<%inherit file="../layouts/config.mako"/>
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('HTTP web host')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<div class="form-row">
<div class="col-md-12">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="fas fa-globe"></span>
</span>
</div>
<input name="web_host" id="web_host"
value="${sickrage.app.config.general.web_host}"
placeholder="${'0.0.0.0'}"
title="${_('Web host SiCKRAGE server listens on for WebUI requests')}"
class="form-control"/>
</div>
</div>
</div>
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('HTTP web root')}</label>
......
......@@ -200,16 +200,6 @@
onclick="window.open(this.href, '_blank'); return false;">https://git.sickrage.ca/SiCKRAGE/sickrage/</a>
</div>
</div>
<br/>
<div class="form-row">
<div class="col-lg-3 col-md-3 col-sm-3">
<i class="sickrage-core sickrage-core-irc"></i> ${_('IRChat')}
</div>
<div class="col-lg-9 col-md-9 col-sm-9">
<a href="irc://irc.freenode.net/#sickrage" rel="noreferrer"><i>#sickrage</i>
${_('on')} <i>irc.freenode.net</i></a>
</div>
</div>
</div>
</div>
</div>
......
......@@ -90,7 +90,7 @@
% for providerID, providerObj in sickrage.app.search_providers.sort().items():
% if (providerObj.provider_type in [SearchProviderType.NZB, SearchProviderType.NEWZNAB] and sickrage.app.config.general.use_nzbs) or (providerObj.provider_type in [SearchProviderType.TORRENT, SearchProviderType.TORRENT_RSS] and sickrage.app.config.general.use_torrents):
<% provider_url = providerObj.urls.get('base_url', '') %>
% if providerObj.custom_settings.get('custom_url', None) and validate_url(providerObj.custom_settings['custom_url']):
% if 'custom_url' in providerObj.custom_settings and validate_url(providerObj.custom_settings['custom_url']):
<% provider_url = providerObj.custom_settings['custom_url'] %>
% endif
<div class="list-group-item list-group-item-action ${('list-group-item-dark', 'list-group-item-secondary')[bool(providerObj.provider_type in [SearchProviderType.TORRENT, SearchProviderType.TORRENT_RSS])]} rounded mb-1 p-2"
......@@ -290,7 +290,7 @@
% for providerID, providerObj in sickrage.app.search_providers.nzb().items():
<div class="providerDiv" id="${providerID}Div">
% if providerObj.custom_settings.get('username', None):
% if 'username' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Username:')}</label>
......@@ -309,7 +309,7 @@
</div>
% endif
% if providerObj.custom_settings.get('api_key', None):
% if 'api_key' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('API key:')}</label>
......@@ -420,7 +420,7 @@
% for providerID, providerObj in sickrage.app.search_providers.all_torrent().items():
<div class="providerDiv" id="${providerID}Div">
% if providerObj.custom_settings.get('custom_url', None):
% if 'custom_url' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Custom URL:')}</label>
......@@ -441,7 +441,7 @@
</div>
% endif
% if providerObj.custom_settings.get('api_key', None):
% if 'api_key' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Api key:')}</label>
......@@ -462,7 +462,7 @@
</div>
% endif
% if providerObj.custom_settings.get('digest', None):
% if 'digest' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Digest:')}</label>
......@@ -482,7 +482,7 @@
</div>
% endif
% if providerObj.custom_settings.get('hash', None):
% if 'hash' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Hash:')}</label>
......@@ -504,7 +504,7 @@
</div>
% endif
% if providerObj.custom_settings.get('username', None):
% if 'username' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Username:')}</label>
......@@ -525,7 +525,7 @@
</div>
% endif
% if providerObj.custom_settings.get('password', None):
% if 'password' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Password:')}</label>
......@@ -545,7 +545,7 @@
</div>
% endif
% if providerObj.custom_settings.get('passkey', None):
% if 'passkey' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Passkey:')}</label>
......@@ -595,7 +595,7 @@
</div>
% endif
% if providerObj.custom_settings.get('pin', None):
% if 'pin' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Pin:')}</label>
......@@ -638,7 +638,7 @@
</div>
% endif
% if providerObj.custom_settings.get('minseed', None):
% if 'minseed' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Minimum seeders:')}</label>
......@@ -660,7 +660,7 @@
</div>
% endif
% if providerObj.custom_settings.get('minleech', None):
% if 'minleech' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Minimum leechers:')}</label>
......@@ -682,7 +682,7 @@
</div>
% endif
% if providerObj.custom_settings.get('confirmed', None):
% if 'confirmed' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Confirmed download')}</label>
......@@ -698,7 +698,7 @@
</div>
% endif
% if providerObj.custom_settings.get('ranked', None):
% if 'ranked' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Ranked torrents')}</label>
......@@ -714,7 +714,7 @@
</div>
% endif
% if providerObj.custom_settings.get('engrelease', None):
% if 'engrelease' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('English torrents')}</label>
......@@ -730,7 +730,7 @@
</div>
% endif
% if providerObj.custom_settings.get('onlyspasearch', None):
% if 'onlyspasearch' in providerObj.custom_settings:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('For Spanish torrents')}</label>