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>
</label>
<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>
</label>
<br />
@ -32,6 +32,7 @@
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
$('#enable').checked(config.Enable);
$('#replaceAlbumName').checked(config.ReplaceAlbumName);
Dashboard.hideLoadingMsg();
});
@ -43,6 +44,7 @@
var form = this;
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
config.Enable = $('#enable', form).checked();
config.ReplaceAlbumName = $('#replaceAlbumName', form).checked();
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
});