Commit edbf46a9 authored by echel0n's avatar echel0n

Added migration functions to version updater

parent 7a6cb045
......@@ -70,7 +70,6 @@ class Config(object):
self.notify_on_update = True
self.notify_on_login = False
self.pip2_path = ""
self.pip3_path = ""
self.git_reset = True
self.git_username = ""
self.git_password = ""
......@@ -734,7 +733,6 @@ class Config(object):
'usenet_retention': 500,
'download_propers': True,
'pip2_path': 'pip2',
'pip3_path': 'pip3',
'del_rar_contents': False,
'process_method': 'copy',
'file_timestamp_timezone': 'network',
......@@ -1410,7 +1408,6 @@ class Config(object):
self.socket_timeout = self.check_setting_int('General', 'socket_timeout')
self.default_page = self.check_setting_str('General', 'default_page')
self.pip2_path = self.check_setting_str('General', 'pip2_path')
self.pip3_path = self.check_setting_str('General', 'pip3_path')
self.git_path = self.check_setting_str('General', 'git_path')
self.git_autoissues = self.check_setting_bool('General', 'git_autoissues')
self.git_username = self.check_setting_str('General', 'git_username', censor=True)
......@@ -2011,7 +2008,6 @@ class Config(object):
'add_shows_wo_dir': int(self.add_shows_wo_dir),
'extra_scripts': '|'.join(self.extra_scripts),
'pip2_path': self.pip2_path,
'pip3_path': self.pip3_path,
'git_path': self.git_path,
'ignore_words': self.ignore_words,
'require_words': self.require_words,
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1105,16 +1105,6 @@ class Home(WebHandler):
else:
return _('Failed to find {path}'.format(path=path))
def installRequirements(self):
sickrage.app.alerts.message(_('Installing SiCKRAGE requirements'))
if not sickrage.app.version_updater.updater.install_requirements(
sickrage.app.version_updater.updater.current_branch):
sickrage.app.alerts.message(_('Failed to install SiCKRAGE requirements'))
else:
sickrage.app.alerts.message(_('Installed SiCKRAGE requirements successfully!'))
return self.redirect(self.previous_url())
def branchCheckout(self, branch):
if branch and sickrage.app.version_updater.updater.current_branch != branch:
sickrage.app.alerts.message(_('Checking out branch: '), branch)
......@@ -3786,7 +3776,7 @@ class ConfigGeneral(Config):
git_reset=None, git_username=None, git_password=None, git_autoissues=None, gui_language=None,
display_all_seasons=None, showupdate_stale=None, notify_on_login=None, allowed_video_file_exts=None,
enable_api_providers_cache=None, enable_upnp=None, web_external_port=None,
strip_special_file_bits=None, pip2_path=None, pip3_path=None, **kwargs):
strip_special_file_bits=None, pip2_path=None, **kwargs):
results = []
......@@ -3831,7 +3821,6 @@ class ConfigGeneral(Config):
sickrage.app.config.git_autoissues = checkbox_to_value(git_autoissues)
sickrage.app.config.git_path = git_path
sickrage.app.config.pip2_path = pip2_path
sickrage.app.config.pip3_path = pip3_path
sickrage.app.config.calendar_unprotected = checkbox_to_value(calendar_unprotected)
sickrage.app.config.calendar_icons = checkbox_to_value(calendar_icons)
sickrage.app.config.no_restart = checkbox_to_value(no_restart)
......
......@@ -1290,45 +1290,6 @@
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('PIP3 executable path')}</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-file"></span>
</span>
</div>
<input id="pip3_path" name="pip3_path"
value="${sickrage.app.config.pip3_path}"
placeholder="${_('ex: /path/to/pip3')}"
title="only needed if OS is unable to locate pip3 from env"
class="form-control" autocapitalize="off"/>
<div class="input-group-append">
<span class="input-group-text">
<span class="btn" id="verifyPip3Path">
${_('Verify PIP3 Path')}
</span>
</span>
</div>
</div>
</div>
</div>
<p></p>
<div class="form-row">
<div class="col-md-12">
<div class="testNotification" id="testPIP3-result">
${_('Click verify path to test.')}
</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-12">
<input type="submit" class="btn config_submitter" value="${_('Save Changes')}"/>
......
......@@ -3024,32 +3024,6 @@ $(document).ready(function ($) {
});
}
if ($('#pip3_path').length) {
$('#pip3_path').fileBrowser({
title: gt('Select path to pip3'),
key: 'pip3_path',
includeFiles: 1
});
$('#verifyPip3Path').click(function () {
var pip3_path = $.trim($('#pip3_path').val());
if (!pip3_path) {
$('#testPIP3-result').html(gt('Please fill out the necessary fields above.'));
$('#pip3_path').addClass('warning');
return;
}
$('#pip3_path').removeClass('warning');
$(this).prop('disabled', true);
$('#testPIP3-result').html(SICKRAGE.loadingHTML);
$.get(SICKRAGE.srWebRoot + '/home/verifyPath', {
'path': pip3_path
}).done(function (data) {
$('#testPIP3-result').html(data);
$('#verifyPip3Path').prop('disabled', false);
});
});
}
if ($('#git_path').length) {
$('#git_path').fileBrowser({
title: gt('Select path to git'),
......
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