Commit e1a4bc05 authored by echel0n's avatar echel0n

Added `--disable_updates` startup option to allow disabling of application...

Added `--disable_updates` startup option to allow disabling of application updates both auto and manual.
parent add2bae6
......@@ -260,6 +260,9 @@ def main():
parser.add_argument('--nolaunch',
action='store_true',
help='Suppress launching web browser on startup')
parser.add_argument('--disable_updates',
action='store_true',
help='Disable application updates')
parser.add_argument('--db_type',
default='sqlite',
help='Database type: sqlite or mysql')
......@@ -285,6 +288,7 @@ def main():
app.web_port = int(args.port)
app.web_host = args.host
app.no_launch = args.nolaunch
app.disable_updates = args.disable_updates
app.developer = args.dev
app.db_type = args.db_type
app.db_prefix = args.db_prefix
......
......@@ -98,6 +98,7 @@ class Core(object):
self.cache_dir = None
self.quiet = None
self.no_launch = None
self.disable_updates = None
self.web_port = None
self.developer = None
self.db_type = None
......
......@@ -48,7 +48,7 @@ class VersionUpdater(object):
return self.find_install_type()
def run(self, force=False):
if self.amActive:
if self.amActive or sickrage.app.disable_updates:
return
self.amActive = True
......
......@@ -684,7 +684,7 @@ class UpdateCheckHandler(BaseHandler, ABC):
def get(self, *args, **kwargs):
pid = self.get_argument('pid')
if str(pid) != str(sickrage.app.pid):
if str(pid) != str(sickrage.app.pid) or sickrage.app.disable_updates:
return self.redirect("/{}/".format(sickrage.app.config.default_page))
sickrage.app.alerts.message(_("Updater"), _('Checking for updates'))
......
......@@ -183,21 +183,21 @@
<i class="fas fa-fw fa-sync"></i>&nbsp;${_('Update PLEX')}
</a>
% endif
## % if sickrage.app.config.use_kodi and sickrage.app.config.kodi_host != "":
## <a class="dropdown-item" href="${srWebRoot}/home/updateKODI/">
## <i class="fas fa-fw fa-sync"></i>&nbsp;${_('Update KODI')}
## </a>
## % endif
## % if sickrage.app.config.use_emby and sickrage.app.config.emby_host != "" and sickrage.app.config.emby_apikey != "":
## <a class="dropdown-item" href="${srWebRoot}/home/updateEMBY/">
## <i class="fas fa-fw fa-sync"></i>&nbsp;${_('Update Emby')}
## </a>
## % endif
## % if sickrage.app.config.use_kodi and sickrage.app.config.kodi_host != "":
## <a class="dropdown-item" href="${srWebRoot}/home/updateKODI/">
## <i class="fas fa-fw fa-sync"></i>&nbsp;${_('Update KODI')}
## </a>
## % endif
## % if sickrage.app.config.use_emby and sickrage.app.config.emby_host != "" and sickrage.app.config.emby_apikey != "":
## <a class="dropdown-item" href="${srWebRoot}/home/updateEMBY/">
## <i class="fas fa-fw fa-sync"></i>&nbsp;${_('Update Emby')}
## </a>
## % endif
% if torrent_webui_url:
<a class="dropdown-item" href="${torrent_webui_url}" target="_blank">
<i class="fas fa-fw fa-video"></i>&nbsp;${_('Manage Torrents')}
</a>
% endif
<a class="dropdown-item" href="${torrent_webui_url}" target="_blank">
<i class="fas fa-fw fa-video"></i>&nbsp;${_('Manage Torrents')}
</a>
% endif
<a class="dropdown-item" href="${srWebRoot}/manage/failedDownloads/">
<i class="fas fa-fw fa-first-aid"></i>&nbsp;${_('Failed Downloads')}
</a>
......@@ -304,9 +304,11 @@
<i class="fas fa-fw fa-file-archive"></i>&nbsp;${_('View Log')}
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="${srWebRoot}/home/updateCheck?pid=${srPID}">
<i class="fas fa-fw fa-check-square"></i>&nbsp;${_('Check For Updates')}
</a>
%if not sickrage.app.disable_updates:
<a class="dropdown-item" href="${srWebRoot}/home/updateCheck?pid=${srPID}">
<i class="fas fa-fw fa-check-square"></i>&nbsp;${_('Check For Updates')}
</a>
%endif
<a class="dropdown-item" href="${srWebRoot}/home/restart/?pid=${srPID}"
class="confirm restart">
<i class="fas fa-fw fa-redo"></i>&nbsp;${_('Restart')}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment