jellyfin-server/MediaBrowser.Providers/Plugins/AudioDb/Configuration/config.html

54 lines
2.1 KiB
HTML
Raw Normal View History

2020-03-02 17:07:31 +00:00
<!DOCTYPE html>
<html>
<head>
<title>AudioDB</title>
</head>
<body>
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
<div data-role="content">
<div class="content-primary">
<form class="configForm">
<label class="checkboxContainer">
2020-03-08 03:19:38 +00:00
<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>
2020-03-02 17:07:31 +00:00
<br />
<div>
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
</div>
</form>
</div>
</div>
<script type="text/javascript">
var PluginConfig = {
pluginId: "a629c0da-fac5-4c7e-931a-7174223f14c8"
};
2020-07-20 23:31:20 +00:00
document.querySelector('.configPage')
.addEventListener('pageshow', function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
document.querySelector('#replaceAlbumName').checked = config.ReplaceAlbumName;
2020-07-20 23:31:20 +00:00
Dashboard.hideLoadingMsg();
});
2020-03-02 17:07:31 +00:00
});
2020-07-20 23:31:20 +00:00
document.querySelector('.configForm')
.addEventListener('submit', function (e) {
Dashboard.showLoadingMsg();
2020-07-20 23:31:20 +00:00
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
config.ReplaceAlbumName = document.querySelector('#replaceAlbumName').checked;
2020-07-20 23:31:20 +00:00
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
});
2020-07-20 23:31:20 +00:00
e.preventDefault();
return false;
2020-03-02 17:07:31 +00:00
});
</script>
</div>
</body>
</html>