2020-07-04 23:33:19 +09:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Template</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="TemplateConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
|
|
|
|
<div data-role="content">
|
|
|
|
<div class="content-primary">
|
2022-05-05 18:10:34 -05:00
|
|
|
<form id="FingerprintConfigForm">
|
2021-01-10 00:25:51 +09:00
|
|
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
2020-07-04 23:33:19 +09:00
|
|
|
<label class="emby-checkbox-label">
|
2022-05-05 18:10:34 -05:00
|
|
|
<input id="CacheFingerprints" type="checkbox" is="emby-checkbox" />
|
|
|
|
<span>Cache fingerprints to disk</span>
|
2020-07-04 23:33:19 +09:00
|
|
|
</label>
|
2022-05-05 18:10:34 -05:00
|
|
|
|
|
|
|
<div class="fieldDescription">
|
|
|
|
If checked, will store the fingerprints for all subsequently scanned files to disk.
|
|
|
|
Caching fingerprints avoids having to re-run fpcalc on each file, at the expense of disk usage.
|
|
|
|
</div>
|
2020-07-04 23:33:19 +09:00
|
|
|
</div>
|
2022-05-05 18:26:02 -05:00
|
|
|
|
|
|
|
<div class="inputContainer">
|
|
|
|
<label class="inputLabel inputLabelUnfocused" for="AnInteger">Show skip prompt at</label>
|
|
|
|
<input id="ShowPromptAdjustment" type="number" is="emby-input" min="0" />
|
|
|
|
<div class="fieldDescription">
|
|
|
|
Seconds before the introduction starts to display the skip prompt at.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inputContainer">
|
|
|
|
<label class="inputLabel inputLabelUnfocused" for="AnInteger">Hide skip prompt at</label>
|
|
|
|
<input id="HidePromptAdjustment" type="number" is="emby-input" min="0" />
|
|
|
|
<div class="fieldDescription">
|
|
|
|
Seconds after the introduction starts to hide the skip prompt at.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-07-04 23:33:19 +09:00
|
|
|
<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">
|
|
|
|
var TemplateConfig = {
|
2022-05-05 18:10:34 -05:00
|
|
|
pluginUniqueId: 'c83d86bb-a1e0-4c35-a113-e2101cf4ee6b'
|
2020-07-04 23:33:19 +09:00
|
|
|
};
|
|
|
|
|
2020-12-02 17:47:22 -07:00
|
|
|
document.querySelector('#TemplateConfigPage')
|
2021-01-10 00:25:51 +09:00
|
|
|
.addEventListener('pageshow', function() {
|
2020-12-02 17:47:22 -07:00
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
2022-05-05 18:10:34 -05:00
|
|
|
document.querySelector('#CacheFingerprints').checked = config.CacheFingerprints;
|
2022-05-05 18:26:02 -05:00
|
|
|
|
|
|
|
document.querySelector('#ShowPromptAdjustment').value = config.ShowPromptAdjustment;
|
|
|
|
document.querySelector('#HidePromptAdjustment').value = config.HidePromptAdjustment;
|
|
|
|
|
2020-12-02 17:47:22 -07:00
|
|
|
Dashboard.hideLoadingMsg();
|
2022-05-05 18:10:34 -05:00
|
|
|
});
|
2021-01-10 00:25:51 +09:00
|
|
|
});
|
2022-05-05 18:10:34 -05:00
|
|
|
|
|
|
|
document.querySelector('#FingerprintConfigForm')
|
2020-12-02 17:47:22 -07:00
|
|
|
.addEventListener('submit', function() {
|
2020-07-04 23:33:19 +09:00
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
2022-05-05 18:10:34 -05:00
|
|
|
config.CacheFingerprints = document.querySelector('#CacheFingerprints').checked;
|
2022-05-05 18:26:02 -05:00
|
|
|
|
|
|
|
config.ShowPromptAdjustment = document.querySelector("#ShowPromptAdjustment").value;
|
|
|
|
config.HidePromptAdjustment = document.querySelector("#HidePromptAdjustment").value;
|
|
|
|
|
2020-07-04 23:33:19 +09:00
|
|
|
ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) {
|
|
|
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
|
|
|
});
|
|
|
|
});
|
2021-01-10 00:25:51 +09:00
|
|
|
|
2020-07-04 23:33:19 +09:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|