update audiodb config page

This commit is contained in:
dkanada 2020-03-08 12:19:38 +09:00
parent acf1698d2b
commit f8b391538d

View File

@ -13,7 +13,7 @@
<span>Enable this provider for metadata searches on artists and albums.</span> <span>Enable this provider for metadata searches on artists and albums.</span>
</label> </label>
<label class="checkboxContainer"> <label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="replaceArtistName" /> <input is="emby-checkbox" type="checkbox" id="replaceAlbumName" />
<span>When an album is found during a metadata search, replace the name with the value on the server.</span> <span>When an album is found during a metadata search, replace the name with the value on the server.</span>
</label> </label>
<br /> <br />
@ -32,6 +32,7 @@
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) { ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
$('#enable').checked(config.Enable); $('#enable').checked(config.Enable);
$('#replaceAlbumName').checked(config.ReplaceAlbumName);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
}); });
@ -43,6 +44,7 @@
var form = this; var form = this;
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) { ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
config.Enable = $('#enable', form).checked(); config.Enable = $('#enable', form).checked();
config.ReplaceAlbumName = $('#replaceAlbumName', form).checked();
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult); ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
}); });