From 7c0153857102f4a2f5b1d6fb25a04fae9e15e194 Mon Sep 17 00:00:00 2001 From: Sleeps Date: Wed, 7 Oct 2026 13:44:04 +0100 Subject: [PATCH 1/6] Split targeted library removal from indexing --- scene_search/web/index.html | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/scene_search/web/index.html b/scene_search/web/index.html index 2677738..45c846f 100644 --- a/scene_search/web/index.html +++ b/scene_search/web/index.html @@ -72,10 +72,11 @@ -
Deselected libraries are removed from Scene Search SQLite and Meilisearch when you apply the selection.
+
Apply selection removes deselected libraries directly from SQLite and Meilisearch. It does not rebuild the whole search index.
Loading…
- + +
@@ -239,6 +240,37 @@ } } + async function applyLibrarySelection() { + const ids = selectedLibraries(); + if (!ids.length && !window.confirm( + 'No libraries are selected. This will remove all Jellyfin-backed Scene Search data from SQLite and Meilisearch. Continue?' + )) { + return; + } + + try { + $('indexStatus').className = 'status'; + $('indexStatus').textContent = 'Applying library selection...'; + const result = await api('/api/jellyfin/libraries/selection', { + method:'POST', + body:JSON.stringify({library_ids:ids, force:false}) + }); + const removedLibraries = Number(result.removed_libraries || 0); + const removedMedia = Number(result.removed_media || 0); + $('indexStatus').className = 'status ok'; + $('indexStatus').textContent = removedLibraries + ? 'Selection applied: removed ' + removedLibraries + ' librar' + + (removedLibraries === 1 ? 'y' : 'ies') + ' and ' + removedMedia + ' media items' + : 'Selection applied: nothing to remove'; + $('indexDetail').textContent = 'No full Meilisearch rebuild was run.'; + await loadLibraries(); + refreshHealth(); + } catch (e) { + $('indexStatus').className = 'status error'; + $('indexStatus').textContent = e.message; + } + } + async function startIndex() { const ids = selectedLibraries(); if (!ids.length && !window.confirm( @@ -436,6 +468,7 @@ }; $('refreshLibraries').onclick = loadLibraries; $('selectAll').onclick = () => document.querySelectorAll('.libraryCheck').forEach(x => x.checked = true); + $('applyLibraries').onclick = applyLibrarySelection; $('indexNow').onclick = startIndex; $('captionNow').onclick = startCaption; $('captionPause').onclick = toggleCaptionPause; From c8490cf98722cd1e48ed854cb8b6c28c4cee97bd Mon Sep 17 00:00:00 2001 From: Sleeps Date: Wed, 7 Oct 2026 13:44:06 +0100 Subject: [PATCH 2/6] Add targeted library selection action to plugin --- .../Configuration/configPage.html | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/Configuration/configPage.html b/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/Configuration/configPage.html index aaed910..3af5afc 100644 --- a/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/Configuration/configPage.html +++ b/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/Configuration/configPage.html @@ -46,13 +46,16 @@

Indexed Libraries

- Choose which Jellyfin libraries Scene Search should keep indexed. Applying this selection removes deselected libraries from Scene Search SQLite and Meilisearch. Selection is stored in this plugin, not in the Python .env file. + Choose which Jellyfin libraries Scene Search should keep indexed. Apply selection only removes deselected libraries directly from Scene Search SQLite and Meilisearch without rebuilding the full Meilisearch index. Selection is stored in this plugin, not in the Python .env file.
Loading libraries…
+