mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-17 23:41:28 +00:00
Make caption startup responsive
This commit is contained in:
@@ -345,20 +345,29 @@
|
||||
(status.frames_total || 0) + ' frames';
|
||||
|
||||
if (status.running) {
|
||||
var starting = status.stage === 'starting';
|
||||
var syncing = status.stage === 'syncing' || status.stage === 'sync';
|
||||
var stopping = !!status.stop_requested;
|
||||
button.disabled = syncing || stopping;
|
||||
button.querySelector('span').textContent = syncing
|
||||
? 'Finishing...'
|
||||
: (stopping
|
||||
? 'Stopping...'
|
||||
: ((status.paused || status.pause_requested) ? 'Resume' : 'Pause'));
|
||||
button.disabled = starting || syncing || stopping;
|
||||
button.querySelector('span').textContent = starting
|
||||
? 'Starting...'
|
||||
: (syncing
|
||||
? 'Finishing...'
|
||||
: (stopping
|
||||
? 'Stopping...'
|
||||
: ((status.paused || status.pause_requested) ? 'Resume' : 'Pause')));
|
||||
stopButton.disabled = syncing || stopping;
|
||||
forceCheckbox.disabled = true;
|
||||
|
||||
if (stopping) {
|
||||
container.textContent = 'Stop requested; finishing the current frame.';
|
||||
container.textContent = starting
|
||||
? 'Stop requested; finishing preparation.'
|
||||
: 'Stop requested; finishing the current frame.';
|
||||
detail.textContent = status.title || '';
|
||||
} else if (starting) {
|
||||
container.textContent = 'Starting captioning.';
|
||||
detail.textContent =
|
||||
status.preparing || 'Preparing caption job...';
|
||||
} else if (status.paused) {
|
||||
container.textContent = 'Captioning paused.';
|
||||
detail.textContent =
|
||||
@@ -610,7 +619,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
page.querySelector('#captionStatus').textContent = 'Saving settings and starting captioning...';
|
||||
page.querySelector('#captionNow').disabled = true;
|
||||
page.querySelector('#captionNow span').textContent = 'Starting...';
|
||||
page.querySelector('#captionStop').disabled = true;
|
||||
page.querySelector('#forceCaption').disabled = true;
|
||||
page.querySelector('#captionStatus').textContent = 'Starting captioning...';
|
||||
page.querySelector('#captionDetail').textContent = 'Saving settings and sending start request...';
|
||||
|
||||
ApiClient.getPluginConfiguration(pluginId).then(function (config) {
|
||||
config.SelectedLibraryIds = ids;
|
||||
|
||||
Reference in New Issue
Block a user