Commit 6d8c60a0 authored by echel0n's avatar echel0n
Browse files

Fixed issue with custom providers having spaces in their names that was...

Fixed issue with custom providers having spaces in their names that was causing settings to not save
parent 23f9684e
# Changelog
- * 0ca909e - 2018-10-14: Fixed issues with removing custom torrent/newznab providers
- * ba79a49 - 2018-10-14: Fixed issue with custom providers having spaces in their names that was causing settings to not save
- * 23f9684 - 2018-10-14: Fixed issues with removing custom torrent/newznab providers
- * e2132a2 - 2018-10-14: Fixed issue#286 - added support for non-english indexer images
- * d186f55 - 2018-10-14: Release v9.3.87
- * ca05ceb - 2018-10-14: Fixed issue with freebsd init script not daemonizing the app
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4288,7 +4288,10 @@ class ConfigProviders(Config):
# custom providers
custom_providers = ''
for curProviderStr in kwargs.get('provider_strings', '').split():
for curProviderStr in kwargs.get('provider_strings', '').split('!!!'):
if not len(curProviderStr):
continue
custom_providers += '{}!!!'.format(curProviderStr)
cur_type, curProviderData = curProviderStr.split('|', 1)
......@@ -4316,13 +4319,13 @@ class ConfigProviders(Config):
# remove providers
for p in list(set(sickrage.app.search_providers.provider_order).difference(
[x.split(':')[0] for x in kwargs.get('provider_order', '').split()])):
[x.split(':')[0] for x in kwargs.get('provider_order', '').split('!!!')])):
providerObj = sickrage.app.search_providers.all()[p]
del sickrage.app.search_providers[providerObj.type][p]
# enable/disable/sort providers
sickrage.app.search_providers.provider_order = []
for curProviderStr in kwargs.get('provider_order', '').split():
for curProviderStr in kwargs.get('provider_order', '').split('!!!'):
curProvider, curEnabled = curProviderStr.split(':')
sickrage.app.search_providers.provider_order += [curProvider]
if curProvider in sickrage.app.search_providers.all():
......
......@@ -4801,7 +4801,7 @@ $(document).ready(function ($) {
}
if ($('#provider_order_list > #' + id).length === 0 && showProvider !== 'false') {
$('#provider_order_list').append('<li class="ui-state-default" id="' + id + '"> <input type="checkbox" id="enable_' + id + '" class="provider_enabler" CHECKED> <a href="' + SICKRAGE.anonURL + url + '" class="imgLink" target="_new"><img src="' + SICKRAGE.srWebRoot + '/images/providers/nzb.png" alt="' + name + '" width="16" height="16"></a> ' + name + '</li>');
//$('#provider_order_list').append('<li class="ui-state-default" id="' + id + '"> <input type="checkbox" id="enable_' + id + '" class="provider_enabler" CHECKED> <a href="' + SICKRAGE.anonURL + url + '" class="imgLink" target="_new"><img src="' + SICKRAGE.srWebRoot + '/images/providers/nzb.png" alt="' + name + '" width="16" height="16"></a> ' + name + '</li>');
$('#provider_order_list').sortable("refresh");
}
......@@ -4941,7 +4941,7 @@ $(document).ready(function ($) {
}
if ($('#provider_order_list > #' + id).length === 0 && showProvider !== 'false') {
$('#provider_order_list').append('<li class="ui-state-default" id="' + id + '"> <input type="checkbox" id="enable_' + id + '" class="provider_enabler" CHECKED> <a href="' + SICKRAGE.anonURL + url + '" class="imgLink" target="_new"><img src="' + SICKRAGE.srWebRoot + '/images/providers/torrent.png" alt="' + name + '" width="16" height="16"></a> ' + name + '</li>');
//$('#provider_order_list').append('<li class="ui-state-default" id="' + id + '"> <input type="checkbox" id="enable_' + id + '" class="provider_enabler" CHECKED> <a href="' + SICKRAGE.anonURL + url + '" class="imgLink" target="_new"><img src="' + SICKRAGE.srWebRoot + '/images/providers/torrent.png" alt="' + name + '" width="16" height="16"></a> ' + name + '</li>');
$('#provider_order_list').sortable("refresh");
}
......@@ -5031,8 +5031,8 @@ $(document).ready(function ($) {
}
}
$("#provider_strings").val(provStrings.join(' '));
$("#provider_order").val(finalArr.join(' '));
$("#provider_strings").val(provStrings.join('!!!'));
$("#provider_order").val(finalArr.join('!!!'));
SICKRAGE.config.providers.refreshEditAProvider();
},
......
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