fix(server-mode): handle quote stripping in wrapper and empty crop checks
Build and Release Plugin / release (push) Successful in 31s

This commit is contained in:
2026-09-17 19:54:01 +02:00
parent f6ed790801
commit cb16bf0074
+8 -10
View File
@@ -58,18 +58,16 @@ namespace JellyfinPlugin.Tasks
{ {
string cropData = await CropHelper.DetectCropAsync(path, config.CropDetectLimit); string cropData = await CropHelper.DetectCropAsync(path, config.CropDetectLimit);
if (item.ProviderIds == null)
{
item.ProviderIds = new Dictionary<string, string>();
}
// 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 (!string.IsNullOrEmpty(cropData))
{
if (item.ProviderIds == null)
{
item.ProviderIds = new Dictionary<string, string>();
}
item.ProviderIds["BlackBarCrop"] = cropData;
await _libraryManager.UpdateItemAsync(item, item, ItemUpdateType.MetadataEdit, cancellationToken);
_logger.LogInformation("Found black bars {Crop} in {Path}", cropData, path); _logger.LogInformation("Found black bars {Crop} in {Path}", cropData, path);
}
} }
catch (Exception ex) catch (Exception ex)
{ {