138 lines
8.2 KiB
HTML
138 lines
8.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>TubeArchivistMetadata</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">
|
|
<form id="TemplateConfigForm">
|
|
<div>
|
|
<h1>TubeArchivistMetadata</h1>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="CollectionTitle">Collection Title</label>
|
|
<input id="CollectionTitle" name="CollectionTitle" type="text" is="emby-input"
|
|
placeholder="eg. YouTube" />
|
|
<div class="fieldDescription">TubeArchivist collection display name</div>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="TubeArchivistUrl">TubeArchivist URL</label>
|
|
<input id="TubeArchivistUrl" name="TubeArchivistUrl" type="text" is="emby-input"
|
|
placeholder="http://..." />
|
|
<div class="fieldDescription">TubeArchivist URL</div>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="TubeArchivistApiKey">TubeArchivist API
|
|
key</label>
|
|
<input id="TubeArchivistApiKey" name="TubeArchivistApiKey" type="text" is="emby-input" />
|
|
<div class="fieldDescription">TubeArchivist API key</div>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="MaxDescriptionLength">Maximum overviews
|
|
length</label>
|
|
<input id="MaxDescriptionLength" name="MaxDescriptionLength" type="number" is="emby-input"
|
|
min="0" />
|
|
<div class="fieldDescription">This is the maximum length of the descriptions showed in series
|
|
and episodes</div>
|
|
</div>
|
|
<div>
|
|
<h2>Playback synchronization</h2>
|
|
</div>
|
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
|
<label class="emby-checkbox-label" for="JFTASync">
|
|
<input id="JFTASync" name="JFTASync" type="checkbox" is="emby-checkbox" />
|
|
<span>Synchronize Jellyfin playback progress to TubeArchivist</span>
|
|
</label>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="JFUsernameFrom">Jellyfin username to sync
|
|
playback status from</label>
|
|
<input id="JFUsernameFrom" name="JFUsernameFrom" type="text" is="emby-input"
|
|
placeholder="Username1, username2, ..." />
|
|
<div class="fieldDescription">This is the Jellyfin username to synchronize data from on
|
|
TubeArchivist</div>
|
|
</div>
|
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
|
<label class="emby-checkbox-label" for="TAJFSync">
|
|
<input id="TAJFSync" name="TAJFSync" type="checkbox" is="emby-checkbox" />
|
|
<span>Synchronize TubeArchivist playback progress to Jellyfin</span>
|
|
</label>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="JFUsernamesTo">Jellyfin usernames to sync
|
|
playback status to</label>
|
|
<input id="JFUsernamesTo" name="JFUsernamesTo" type="text" is="emby-input"
|
|
placeholder="Username1, username2, ..." />
|
|
<div class="fieldDescription">These are the (comma separated) Jellyfin usernames to synchronize
|
|
data from TubeArchivist</div>
|
|
</div>
|
|
<div class="inputContainer">
|
|
<label class="inputLabel inputLabelUnfocused" for="TAJFTaskInterval">TubeArchivist to Jellyfin
|
|
playback progress synchronization interval</label>
|
|
<input id="TAJFTaskInterval" name="TAJFTaskInterval" type="number" is="emby-input" min="1" />
|
|
<div class="fieldDescription">This is the TubeArchivist to Jellyfin playback progress
|
|
synchronization interval in seconds (Jellyfin restart required).</div>
|
|
</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">
|
|
var TAMetadataConfig = {
|
|
pluginUniqueId: 'dc97d0c6-28b0-4242-afb4-5833ae1b3715'
|
|
};
|
|
|
|
document.querySelector('#TemplateConfigPage')
|
|
.addEventListener('pageshow', function () {
|
|
Dashboard.showLoadingMsg();
|
|
ApiClient.getPluginConfiguration(TAMetadataConfig.pluginUniqueId).then(function (config) {
|
|
document.querySelector('#CollectionTitle').value = config.CollectionTitle;
|
|
document.querySelector('#TubeArchivistUrl').value = config.TubeArchivistUrl;
|
|
document.querySelector('#TubeArchivistApiKey').value = config.TubeArchivistApiKey;
|
|
document.querySelector('#MaxDescriptionLength').value = config.MaxDescriptionLength;
|
|
document.querySelector('#JFTASync').checked = config.JFTASync;
|
|
document.querySelector('#JFUsernamesTo').value = config.JFUsernamesTo;
|
|
document.querySelector('#TAJFSync').checked = config.TAJFSync;
|
|
document.querySelector('#JFUsernameFrom').value = config.JFUsernameFrom;
|
|
document.querySelector('#TAJFTaskInterval').value = config.TAJFTaskInterval;
|
|
Dashboard.hideLoadingMsg();
|
|
});
|
|
});
|
|
|
|
document.querySelector('#TemplateConfigForm')
|
|
.addEventListener('submit', function (e) {
|
|
Dashboard.showLoadingMsg();
|
|
ApiClient.getPluginConfiguration(TAMetadataConfig.pluginUniqueId).then(function (config) {
|
|
config.CollectionTitle = document.querySelector('#CollectionTitle').value;
|
|
config.TubeArchivistUrl = document.querySelector('#TubeArchivistUrl').value;
|
|
config.TubeArchivistApiKey = document.querySelector('#TubeArchivistApiKey').value;
|
|
config.MaxDescriptionLength = document.querySelector('#MaxDescriptionLength').value;
|
|
config.JFTASync = document.querySelector('#JFTASync').checked;
|
|
config.JFUsernamesTo = document.querySelector('#JFUsernamesTo').value;
|
|
config.TAJFSync = document.querySelector('#TAJFSync').checked;
|
|
config.JFUsernameFrom = document.querySelector('#JFUsernameFrom').value;
|
|
config.TAJFTaskInterval = document.querySelector('#TAJFTaskInterval').value;
|
|
ApiClient.updatePluginConfiguration(TAMetadataConfig.pluginUniqueId, config).then(function (result) {
|
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
|
});
|
|
});
|
|
|
|
e.preventDefault();
|
|
return false;
|
|
});
|
|
</script>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|