From cb16bf0074d637071eab242727ec79b5ac9ddee9 Mon Sep 17 00:00:00 2001 From: Karol Labus Date: Thu, 17 Sep 2026 19:54:01 +0200 Subject: [PATCH] fix(server-mode): handle quote stripping in wrapper and empty crop checks --- JellyfinPlugin/Tasks/LibraryForceRescanTask.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/JellyfinPlugin/Tasks/LibraryForceRescanTask.cs b/JellyfinPlugin/Tasks/LibraryForceRescanTask.cs index 1684b31..d0aa37d 100644 --- a/JellyfinPlugin/Tasks/LibraryForceRescanTask.cs +++ b/JellyfinPlugin/Tasks/LibraryForceRescanTask.cs @@ -58,18 +58,16 @@ namespace JellyfinPlugin.Tasks { string cropData = await CropHelper.DetectCropAsync(path, config.CropDetectLimit); - if (item.ProviderIds == null) - { - item.ProviderIds = new Dictionary(); - } - - // Zawsze dodajemy flagę, nawet jak puste, żeby nie skanować drugi raz tego samego pliku - // (puste oznacza że nie ma czarnych pasów do ucięcia) - item.ProviderIds["BlackBarCrop"] = cropData ?? string.Empty; - await _libraryManager.UpdateItemAsync(item, item, ItemUpdateType.MetadataEdit, cancellationToken); - if (!string.IsNullOrEmpty(cropData)) + { + if (item.ProviderIds == null) + { + item.ProviderIds = new Dictionary(); + } + item.ProviderIds["BlackBarCrop"] = cropData; + await _libraryManager.UpdateItemAsync(item, item, ItemUpdateType.MetadataEdit, cancellationToken); _logger.LogInformation("Found black bars {Crop} in {Path}", cropData, path); + } } catch (Exception ex) {