Commit a92e6b59 authored by echel0n's avatar echel0n
Browse files

Fixed issue with TheTVDB cache storing dict keys as strings instead of integer

parent 1b42b83b
# Changelog
- * 6bb7044 - 2018-08-26: Pre-Release v9.3.60.dev1
- * b9fdaee - 2018-08-26: Fixed issue with TheTVDB cache storing dict keys as strings instead of integer
- * 1b42b83 - 2018-08-26: Pre-Release v9.3.60.dev1
- * 55e4104 - 2018-08-26: Fixed issue where click event for adding root folders was being fired more then twice.
- * ec16f20 - 2018-08-25: Suppressed InsecureRequestWarnings
- * 8b6981b - 2018-08-25: Fixed unicode issues with timezone updater
......
......@@ -19,19 +19,19 @@
<div class="stepwizard-step col-auto">
<a href="#step-1" class="btn btn-success btn-circle">1</a>
<p>
<small>${_('Find A Show')}</small>
<small class="text-white">${_('Find A Show')}</small>
</p>
</div>
<div class="stepwizard-step col-auto">
<a href="#step-2" class="btn btn-dark btn-circle disabled">2</a>
<p>
<small>${_('Pick A Folder')}</small>
<small class="text-white">${_('Pick A Folder')}</small>
</p>
</div>
<div class="stepwizard-step col-auto">
<a href="#step-3" class="btn btn-dark btn-circle disabled">3</a>
<p>
<small>${_('Custom Options')}</small>
<small class="text-white">${_('Custom Options')}</small>
</p>
</div>
</div>
......
......@@ -314,7 +314,15 @@ class Tvdb:
if os.path.isfile(os.path.join(sickrage.app.data_dir, 'thetvdb.json')):
with io.open(os.path.join(sickrage.app.data_dir, 'thetvdb.json'), 'rb') as fp:
try:
self.shows = ShowCache(json.load(fp))
def json_keys2int(x):
if isinstance(x, dict):
try:
return {int(k): v for k, v in x.items()}
except ValueError:
pass
return x
self.shows = ShowCache(json.load(fp, object_hook=json_keys2int))
except:
pass
......
......@@ -484,7 +484,6 @@ $(document).ready(function ($) {
});
SICKRAGE.browser.init();
SICKRAGE.root_dirs.init();
SICKRAGE.quality_chooser.init();
$("#changelog").on('click', function (event) {
......@@ -893,16 +892,15 @@ $(document).ready(function ($) {
SICKRAGE.browser.fileBrowserDialog = $('#fileBrowserDialog').modal();
SICKRAGE.browser.fileBrowserDialog.find('.modal-body').addClass('ui-front');
SICKRAGE.browser.fileBrowserDialog.find('.modal-title').text(options.title);
SICKRAGE.browser.fileBrowserDialog.find('.modal-footer .btn-success').click(function () {
callback(SICKRAGE.browser.currentBrowserPath, options);
SICKRAGE.browser.fileBrowserDialog.modal('hide');
});
} else {
// The title may change, even if fileBrowserDialog already exists
SICKRAGE.browser.fileBrowserDialog.find('.modal-title').text(options.title);
}
SICKRAGE.browser.fileBrowserDialog.find('.modal-footer .btn-success').click(function () {
callback(SICKRAGE.browser.currentBrowserPath, options);
SICKRAGE.browser.fileBrowserDialog.modal('hide');
});
// set up the browser and launch the dialog
var initialDir = '';
if (options.initialDir) {
......@@ -1038,8 +1036,7 @@ $(document).ready(function ($) {
}
}
$('#addRootDir').click(function (e) {
e.stopImmediatePropagation();
$('#addRootDir').click(function () {
$(this).nFileBrowser(SICKRAGE.root_dirs.addRootDir);
});
......@@ -1120,7 +1117,7 @@ $(document).ready(function ($) {
SICKRAGE.root_dirs.refreshRootDirs();
$.get(SICKRAGE.srWebRoot + '/config/general/saveRootDirs', {rootDirString: $('#rootDirText').val()});
location.reload();
return false;
},
editRootDir: function (path) {
......@@ -1546,9 +1543,6 @@ $(document).ready(function ($) {
init: function () {
$.backstretch(SICKRAGE.srWebRoot + '/images/backdrops/home.jpg');
$('.backstretch').css("opacity", SICKRAGE.getMeta('sickrage.FANART_BACKGROUND_OPACITY')).fadeIn("500");
SICKRAGE.home.add_show_options();
SICKRAGE.root_dirs.init();
},
index: function () {
......@@ -2235,6 +2229,9 @@ $(document).ready(function ($) {
add_existing_shows: {
init: function () {
SICKRAGE.home.add_show_options();
SICKRAGE.root_dirs.init();
$('#tableDiv').on('click', '#checkAll', function () {
$('.dirCheck').not(this).prop('checked', this.checked);
});
......@@ -2859,6 +2856,8 @@ $(document).ready(function ($) {
},
general: function () {
SICKRAGE.root_dirs.init();
if ($("input[name='proxy_setting']").val().length === 0) {
$("input[id='proxy_indexers']").prop('checked', false);
$("label[for='proxy_indexers']").hide();
......
Supports Markdown
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