Implement JF->TA watched status synchronization
This commit is contained in:
@@ -41,6 +41,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration
|
||||
TAJFSync = false;
|
||||
_jfUsernamesTo = new HashSet<string>();
|
||||
TAJFTaskInterval = 1;
|
||||
JFTAWatchedTaskInterval = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -135,6 +136,12 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration
|
||||
/// </summary>
|
||||
public int TAJFTaskInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the interval in seconds at which the Jellyfin to TubeArchivist watched statuses synchronization task should run.
|
||||
/// It requires Jellyfin server restart to take effect.
|
||||
/// </summary>
|
||||
public int JFTAWatchedTaskInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the playback progress owners Jellyfin usernames to synchronize data from TubeArchivist.
|
||||
/// </summary>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user