Add updateExisting option to importers & UI

Introduce an updateExisting flag across importers and the Importer UI to control whether existing items should be updated or only new items imported. Changes: added updateExisting to XBVR, StashAPP, Playnite, and Jellyfin config types; added checkboxes in ImporterView (enabled by default) to toggle the behavior; import logic now skips existing items when updateExisting is false and logs/skips appropriately (XBVR, StashAPP, Playnite, Jellyfin). Also: minor Playnite env parsing tweak for port (undefined when not provided) and small logging/cleanup in the Jellyfin album handling.
This commit is contained in:
Lars Behrends
2026-04-12 02:57:34 +02:00
parent 9c7e5a2b19
commit 6250164656
5 changed files with 101 additions and 25 deletions
+9 -5
View File
@@ -6,6 +6,7 @@ import { SOURCE_CATEGORY_MAPPING } from '@/types';
export interface XBVRConfig {
url: string;
apiKey?: string;
updateExisting?: boolean;
}
export interface ImportProgress {
@@ -258,11 +259,14 @@ export async function importFromXBVR(
// Check for duplicate
if (existingTitles.has(video.title)) {
logCallback(`⊘ Skipped duplicate: ${video.title}`);
progressCallback({
current: uniqueActors.length + i + 1
});
continue;
if (!config.updateExisting) {
logCallback(`⊘ Skipped duplicate: ${video.title} (updateExisting is false)`);
progressCallback({
current: uniqueActors.length + i + 1
});
continue;
}
logCallback(`→ Updating existing: ${video.title}`);
}
try {