fix(server-mode): handle quote stripping in wrapper and empty crop checks
Build and Release Plugin / release (push) Successful in 31s
Build and Release Plugin / release (push) Successful in 31s
This commit is contained in:
@@ -58,18 +58,16 @@ namespace JellyfinPlugin.Tasks
|
||||
{
|
||||
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 (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);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user