Fixed: Error reading PDF file

Fixes READARR-6P
pull/1504/head
ta264 3 years ago
parent 6f97ca9a55
commit 9653f9bbca

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

Loading…
Cancel
Save