2024-06-27 01:47:44 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Template</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
2024-11-08 03:09:17 +01:00
|
|
|
<div id="SmartPlaylistConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
|
2024-06-27 01:47:44 +02:00
|
|
|
<div data-role="content">
|
|
|
|
<div class="content-primary">
|
2024-11-08 03:09:17 +01:00
|
|
|
<form id="SmartPlaylistConfigForm">
|
2024-06-27 01:47:44 +02:00
|
|
|
<div class="inputContainer">
|
2024-11-08 03:09:17 +01:00
|
|
|
<label class="inputLabel inputLabelUnfocused" for="InitialProgram">Initial Program</label>
|
|
|
|
<div class="fieldDescription">A program which can set up the environment</div>
|
2024-11-11 14:09:57 +01:00
|
|
|
<textarea id="InitialProgram" class="emby-input" name="InitialProgram" rows="24" cols="120"></textarea>
|
2024-06-27 01:47:44 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
|
|
|
<span>Save</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
2024-11-08 03:09:17 +01:00
|
|
|
var SmartPlaylistConfig = {
|
2024-06-27 01:47:44 +02:00
|
|
|
pluginUniqueId: 'dd2326e3-4d3e-4bfc-80e6-28502c1131df'
|
|
|
|
};
|
|
|
|
|
2024-11-08 03:09:17 +01:00
|
|
|
document.querySelector('#SmartPlaylistConfigPage')
|
2024-06-27 01:47:44 +02:00
|
|
|
.addEventListener('pageshow', function() {
|
|
|
|
Dashboard.showLoadingMsg();
|
2024-11-08 03:09:17 +01:00
|
|
|
ApiClient.getPluginConfiguration(SmartPlaylistConfig.pluginUniqueId).then(function (config) {
|
|
|
|
document.querySelector('#InitialProgram').value = config.InitialProgram;
|
2024-06-27 01:47:44 +02:00
|
|
|
Dashboard.hideLoadingMsg();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2024-11-08 03:09:17 +01:00
|
|
|
document.querySelector('#SmartPlaylistConfigForm')
|
2024-06-27 01:47:44 +02:00
|
|
|
.addEventListener('submit', function(e) {
|
|
|
|
Dashboard.showLoadingMsg();
|
2024-11-08 03:09:17 +01:00
|
|
|
ApiClient.getPluginConfiguration(SmartPlaylistConfig.pluginUniqueId).then(function (config) {
|
|
|
|
config.InitialProgram = document.querySelector('#InitialProgram').value;
|
|
|
|
ApiClient.updatePluginConfiguration(SmartPlaylistConfig.pluginUniqueId, config).then(function (result) {
|
2024-06-27 01:47:44 +02:00
|
|
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|