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,19 +58,17 @@ namespace JellyfinPlugin.Tasks
|
|||||||
{
|
{
|
||||||
string cropData = await CropHelper.DetectCropAsync(path, config.CropDetectLimit);
|
string cropData = await CropHelper.DetectCropAsync(path, config.CropDetectLimit);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(cropData))
|
||||||
|
{
|
||||||
if (item.ProviderIds == null)
|
if (item.ProviderIds == null)
|
||||||
{
|
{
|
||||||
item.ProviderIds = new Dictionary<string, string>();
|
item.ProviderIds = new Dictionary<string, string>();
|
||||||
}
|
}
|
||||||
|
item.ProviderIds["BlackBarCrop"] = cropData;
|
||||||
// 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);
|
await _libraryManager.UpdateItemAsync(item, item, ItemUpdateType.MetadataEdit, cancellationToken);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(cropData))
|
|
||||||
_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)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error scanning file {Path}", path);
|
_logger.LogError(ex, "Error scanning file {Path}", path);
|
||||||
|
|||||||
Reference in New Issue
Block a user