Implement JF->TA watched status synchronization

This commit is contained in:
DarkFighterLuke
2024-09-06 13:46:11 +02:00
parent a968ae838c
commit 233595baac
7 changed files with 275 additions and 3 deletions
@@ -58,6 +58,13 @@
<div class="fieldDescription">This is the Jellyfin username to synchronize data from on
TubeArchivist</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="JFTAWatchedTaskInterval">Jellyfin to TubeArchivist
watched statuses synchronization interval</label>
<input id="JFTAWatchedTaskInterval" name="JFTAWatchedTaskInterval" type="number" is="emby-input" min="1" />
<div class="fieldDescription">This is the Jellyfin to TubeArchivist watched statuses
synchronization interval in seconds (Jellyfin restart required).</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label" for="TAJFSync">
<input id="TAJFSync" name="TAJFSync" type="checkbox" is="emby-checkbox" />
@@ -105,6 +112,7 @@
document.querySelector('#TAJFSync').checked = config.TAJFSync;
document.querySelector('#JFUsernameFrom').value = config.JFUsernameFrom;
document.querySelector('#TAJFTaskInterval').value = config.TAJFTaskInterval;
document.querySelector('#JFTAWatchedTaskInterval').value = config.JFTAWatchedTaskInterval;
Dashboard.hideLoadingMsg();
});
});
@@ -122,6 +130,7 @@
config.TAJFSync = document.querySelector('#TAJFSync').checked;
config.JFUsernameFrom = document.querySelector('#JFUsernameFrom').value;
config.TAJFTaskInterval = document.querySelector('#TAJFTaskInterval').value;
config.JFTAWatchedTaskInterval = document.querySelector('#JFTAWatchedTaskInterval').value;
ApiClient.updatePluginConfiguration(TAMetadataConfig.pluginUniqueId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});