mirror of
https://github.com/Readarr/Readarr
synced 2026-02-12 17:53:26 +01:00
Don't use empty file path from Calibre
This commit is contained in:
parent
8989c55c8c
commit
1cf956a9d9
1 changed files with 5 additions and 3 deletions
|
|
@ -219,11 +219,11 @@ public void SetFields(BookFile file, CalibreSettings settings, bool updateCover
|
|||
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 @@ public void SetFields(BookFile file, CalibreSettings settings, bool updateCover
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue