From 1cf956a9d9e6aaeec86d2491b111470268005c94 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 24 Dec 2023 09:16:43 +0200 Subject: [PATCH] Don't use empty file path from Calibre --- src/NzbDrone.Core/Books/Calibre/CalibreProxy.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Books/Calibre/CalibreProxy.cs b/src/NzbDrone.Core/Books/Calibre/CalibreProxy.cs index 9ed6d341d..add775bcb 100644 --- a/src/NzbDrone.Core/Books/Calibre/CalibreProxy.cs +++ b/src/NzbDrone.Core/Books/Calibre/CalibreProxy.cs @@ -219,11 +219,11 @@ namespace NzbDrone.Core.Books.Calibre double? seriesIndex = null; if (double.TryParse(serieslink?.Position, out var index)) { - _logger.Trace($"Parsed {serieslink?.Position} as {index}"); + _logger.Trace("Parsed '{0}' as '{1}'", serieslink.Position, index); seriesIndex = index; } - _logger.Trace($"Book: {book} Series: {series?.Title}, Position: {seriesIndex}"); + _logger.Trace("Book: {0} Series: {1}, Position: {2}", book, series?.Title, seriesIndex); var cover = edition.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Cover); string image = null; @@ -276,7 +276,9 @@ namespace NzbDrone.Core.Books.Calibre var updatedPath = GetOriginalFormat(updated.Formats); - if (updatedPath != null && updatedPath != file.Path) + _logger.Trace("File path from Calibre: '{0}'", updatedPath); + + if (updatedPath.IsNotNullOrWhiteSpace() && updatedPath != file.Path) { _rootFolderWatchingService.ReportFileSystemChangeBeginning(updatedPath); file.Path = updatedPath;