Commit 23e70050 authored by echel0n's avatar echel0n

Pre-Release v9.4.48.dev1

parent a2e4b436
# Changelog
- * f748a5c - 2018-11-29: Release v9.4.47
- * 9780b9d - 2018-11-30: Pre-Release v9.4.48.dev1
- * b266867 - 2018-11-29: Release v9.4.47
- * 58c1f5e - 2018-11-29: Added code to ensure seeders, leechers, and size are always integer values before being added to cache.
- * 80b928a - 2018-11-28: Release v9.4.46
- * e444d97 - 2018-11-26: Release v9.4.45
......
......@@ -36,8 +36,9 @@ MAIN_DIR = os.path.abspath(os.path.realpath(os.path.expanduser(os.path.dirname(o
PROG_DIR = os.path.abspath(os.path.realpath(os.path.expanduser(os.path.dirname(__file__))))
LOCALE_DIR = os.path.join(PROG_DIR, 'locale')
LIBS_DIR = os.path.join(PROG_DIR, 'libs')
REQS_FILE = os.path.join(MAIN_DIR, 'requirements.txt')
VERSION_FILE = os.path.join(PROG_DIR, 'version.txt')
CHANGELOG_FILE = os.path.join(MAIN_DIR, 'changelog.md')
REQS_FILE = os.path.join(MAIN_DIR, 'requirements.txt')
class Daemon(object):
......@@ -187,7 +188,7 @@ def check_requirements():
def version():
# Get the version number
with io.open(os.path.abspath(os.path.join(os.path.dirname(__file__), 'version.txt'))) as f:
with io.open(VERSION_FILE) as f:
return f.read()
......
......@@ -134,7 +134,7 @@ class VersionUpdater(object):
# default to source install type
install_type = SourceUpdateManager()
if os.path.isdir(os.path.join(os.path.dirname(sickrage.PROG_DIR), '.git')):
if os.path.isdir(os.path.join(sickrage.MAIN_DIR, '.git')):
# GIT install type
install_type = GitUpdateManager()
elif PipUpdateManager().version:
......@@ -213,14 +213,11 @@ class UpdateManager(object):
main_git = sickrage.app.config.git_path or 'git'
sickrage.app.log.debug("Checking if we can use git commands: " + main_git + ' ' + test_cmd)
__, __, exit_status = self._git_cmd(main_git, test_cmd)
# sickrage.app.log.debug("Checking if we can use git commands: " + main_git + ' ' + test_cmd)
__, __, exit_status = self._git_cmd(main_git, test_cmd, silent=True)
if exit_status == 0:
sickrage.app.log.debug("Using: " + main_git)
# sickrage.app.log.debug("Using: " + main_git)
return main_git
else:
sickrage.app.log.debug("Not using: " + main_git)
# trying alternatives
alternative_git = []
......@@ -237,18 +234,18 @@ class UpdateManager(object):
sickrage.app.log.debug("Trying known alternative git locations")
for cur_git in alternative_git:
sickrage.app.log.debug("Checking if we can use git commands: " + cur_git + ' ' + test_cmd)
# sickrage.app.log.debug("Checking if we can use git commands: " + cur_git + ' ' + test_cmd)
__, __, exit_status = self._git_cmd(cur_git, test_cmd)
if exit_status == 0:
sickrage.app.log.debug("Using: " + cur_git)
# sickrage.app.log.debug("Using: " + cur_git)
return cur_git
else:
sickrage.app.log.debug("Not using: " + cur_git)
# Still haven't found a working git
error_message = _('Unable to find your git executable - Set your git path from Settings->General->Advanced OR '
'delete your .git folder and run from source to enable updates.')
'delete your {git_folder} folder and run from source to enable updates.'.format(**{
'git_folder': os.path.join(sickrage.MAIN_DIR, '.git')
}))
sickrage.app.alerts.error(_('Updater'), error_message)
@property
......@@ -257,14 +254,11 @@ class UpdateManager(object):
main_pip = sickrage.app.config.pip_path or 'pip2'
sickrage.app.log.debug("Checking if we can use pip commands: " + main_pip + ' ' + test_cmd)
__, __, exit_status = self._pip_cmd(main_pip, test_cmd)
# sickrage.app.log.debug("Checking if we can use pip commands: " + main_pip + ' ' + test_cmd)
__, __, exit_status = self._pip_cmd(main_pip, test_cmd, silent=True)
if exit_status == 0:
sickrage.app.log.debug("Using: " + main_pip)
# sickrage.app.log.debug("Using: " + main_pip)
return main_pip
else:
sickrage.app.log.debug("Not using: " + main_pip)
# trying alternatives
alternative_pip = []
......@@ -281,21 +275,19 @@ class UpdateManager(object):
sickrage.app.log.debug("Trying known alternative pip locations")
for cur_pip in alternative_pip:
sickrage.app.log.debug("Checking if we can use pip commands: " + cur_pip + ' ' + test_cmd)
# sickrage.app.log.debug("Checking if we can use pip commands: " + cur_pip + ' ' + test_cmd)
__, __, exit_status = self._pip_cmd(cur_pip, test_cmd)
if exit_status == 0:
sickrage.app.log.debug("Using: " + cur_pip)
# sickrage.app.log.debug("Using: " + cur_pip)
return cur_pip
else:
sickrage.app.log.debug("Not using: " + cur_pip)
# Still haven't found a working git
error_message = _('Unable to find your pip executable - Set your pip path from Settings->General->Advanced')
sickrage.app.alerts.error(_('Updater'), error_message)
@staticmethod
def _git_cmd(git_path, args):
def _git_cmd(git_path, args, silent=False):
output = err = None
if not git_path:
......@@ -306,9 +298,11 @@ class UpdateManager(object):
cmd = [git_path] + args.split()
try:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.PROG_DIR)
if not silent:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.MAIN_DIR)
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=(sys.platform == 'win32'), cwd=sickrage.PROG_DIR)
shell=(sys.platform == 'win32'), cwd=sickrage.MAIN_DIR)
output, err = p.communicate()
exit_status = p.returncode
......@@ -320,7 +314,8 @@ class UpdateManager(object):
exit_status = 1
if exit_status == 0:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
if not silent:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
exit_status = 0
elif exit_status == 1:
if output:
......@@ -342,7 +337,7 @@ class UpdateManager(object):
return output, err, exit_status
@staticmethod
def _pip_cmd(pip_path, args):
def _pip_cmd(pip_path, args, silent=False):
output = err = None
if not pip_path:
......@@ -353,9 +348,11 @@ class UpdateManager(object):
cmd = [pip_path] + args.split()
try:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.PROG_DIR)
if not silent:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.MAIN_DIR)
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=(sys.platform == 'win32'), cwd=sickrage.PROG_DIR)
shell=(sys.platform == 'win32'), cwd=sickrage.MAIN_DIR)
output, err = p.communicate()
exit_status = p.returncode
......@@ -366,7 +363,8 @@ class UpdateManager(object):
exit_status = 1
if exit_status == 0:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
if not silent:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
exit_status = 0
else:
sickrage.app.log.debug(' '.join(cmd) + " returned : " + str(output) + ", treat as error for now")
......@@ -556,8 +554,7 @@ class SourceUpdateManager(UpdateManager):
@staticmethod
def _find_installed_version():
with io.open(os.path.join(sickrage.PROG_DIR, 'version.txt')) as f:
return f.read().strip() or ""
return sickrage.version() or ""
def need_update(self):
try:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -43,7 +43,8 @@
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label for="enable_api_providers_cache">
<input type="checkbox" class="enabler toggle color-primary is-material" name="enable_api_providers_cache"
<input type="checkbox" class="enabler toggle color-primary is-material"
name="enable_api_providers_cache"
id="enable_api_providers_cache" ${('', 'checked')[bool(sickrage.app.config.enable_api_providers_cache)]}/>
${_('Enable provider cache ?')}
</label>
......@@ -672,7 +673,8 @@
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label for="fanart_background">
<input type="checkbox" class="enabler toggle color-primary is-material" name="fanart_background"
<input type="checkbox" class="enabler toggle color-primary is-material"
name="fanart_background"
id="fanart_background" ${('', 'checked')[bool(sickrage.app.config.fanart_background)]}>
${_('on the show summary page')}
......@@ -1222,9 +1224,11 @@
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label class="form-check-label">
<input type="checkbox" class="toggle color-primary is-material" name="strip_special_file_bits"
<input type="checkbox" class="toggle color-primary is-material"
name="strip_special_file_bits"
id="strip_special_file_bits" ${('', 'checked')[bool(sickrage.app.config.strip_special_file_bits)]}/>
${_('Strips special filesystem bits from files, if disabled will leave special bits intact.')}<br/>
${_('Strips special filesystem bits from files, if disabled will leave special bits intact.')}
<br/>
<div class="text-info">
<b>${_('NOTE:')}</b> ${_('This will strip inherited permissions')}</div>
</label>
......@@ -1299,7 +1303,8 @@
% if sickrage.app.version_updater.updater.type == "git":
<%
git_branch = sickrage.app.version_updater.updater.remote_branches
git_branches = sickrage.app.version_updater.updater.remote_branches
git_current_branch = sickrage.app.version_updater.updater.current_branch
%>
<hr/>
......@@ -1324,13 +1329,13 @@
</div>
<select id="branchVersion" class="form-control"
title=${_('GIT Branch Version')}>
% if git_branch:
% for cur_branch in git_branch:
% if sickrage.app.developer:
<option value="${cur_branch}" ${('', 'selected')[sickrage.app.version_updater.updater.current_branch == cur_branch]}>${cur_branch}</option>
% elif cur_branch in ['master', 'develop']:
<option value="${cur_branch}" ${('', 'selected')[sickrage.app.version_updater.updater.current_branch == cur_branch]}>${cur_branch}</option>
% endif
% if git_branches:
% for git_branch in git_branches:
<%
if not sickrage.app.developer and git_branch not in ['master', 'develop']:
next
%>
<option value="${git_branch}" ${('', 'selected')[git_current_branch == git_branch]}>${git_branch}</option>
% endfor
% endif
</select>
......@@ -1340,15 +1345,11 @@
<p></p>
<div class="form-row">
<div class="col-md-12">
% if not git_branch:
<input class="btn btn-inline" type="button" id="branchCheckout"
value="Checkout Branch" disabled>
<label for="branchCheckout">${_('Error: No branches found.')}</label>
% else:
<input class="btn btn-inline" type="button" id="branchCheckout"
value="Checkout Branch">
<label for="branchCheckout">${_('select branch to use (restart required)')}</label>
% endif
<input class="btn btn-inline" type="button" id="branchCheckout"
value="Checkout Branch" ${('', 'disabled')[not git_branches]}>
<label for="branchCheckout">
${(_('select branch to use (restart required)'), _('Error: No branches found.'))[not git_branches]}
</label>
</div>
</div>
</div>
......
......@@ -461,10 +461,10 @@
<%
epStr = str(epResult["season"]) + "x" + str(epResult["episode"])
if not epStr in epCats:
next
next
if not sickrage.app.config.display_show_specials and int(epResult["season"]) == 0:
next
next
scene = False
scene_anime = False
......
This diff is collapsed.
9.4.47
\ No newline at end of file
9.4.48.dev1
\ No newline at end of file
......@@ -1329,15 +1329,9 @@ $(document).ready(function ($) {
}
}())
});
SICKRAGE.ajax_search.ajaxEpSearch();
}
if (SICKRAGE.isMeta('sickrage.COMING_EPS_LAYOUT', ['banner', 'poster'])) {
SICKRAGE.ajax_search.ajaxEpSearch({
'size': 16,
'loadingIcon': 'fas fa-spinner fa-spin fa-fw'
});
$('.ep_summary').hide();
$('.ep_summaryTrigger').click(function () {
$(this).next('.ep_summary').slideToggle('normal', function () {
......@@ -1356,6 +1350,8 @@ $(document).ready(function ($) {
// call this function to copy the column selection code into the popover
$.tablesorter.columnSelector.attachTo($('#showListTable'), '#popover-target');
});
SICKRAGE.ajax_search.init();
},
history: function () {
......
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