Fixed: Error reading PDF file

Fixes READARR-6P
This commit is contained in:
ta264 2022-01-24 21:16:55 +00:00
parent 6f97ca9a55
commit 9653f9bbca

View file

@ -350,11 +350,13 @@ private ParsedTrackInfo ReadPdf(string file)
try
{
var book = PdfReader.Open(file, PdfDocumentOpenMode.InformationOnly);
result.Authors = new List<string> { book.Info.Author };
result.BookTitle = book.Info.Title;
if (book.Info != null)
{
result.Authors = new List<string> { book.Info.Author };
result.BookTitle = book.Info.Title;
_logger.Trace(book.Info.ToJson());
_logger.Trace(book.CustomValues.ToJson());
_logger.Trace(book.Info.ToJson());
}
}
catch (Exception e)
{