Fixed: Null reference setting download history for unmapped downloads

This commit is contained in:
ta264 2022-01-14 19:34:52 +00:00
parent 1491788081
commit b1da9a1934

View file

@ -174,7 +174,7 @@ public void Handle(BookImportIncompleteEvent message)
var history = new DownloadHistory
{
EventType = DownloadHistoryEventType.DownloadImportIncomplete,
AuthorId = message.TrackedDownload.RemoteBook?.Author.Id ?? 0,
AuthorId = message.TrackedDownload.RemoteBook?.Author?.Id ?? 0,
DownloadId = message.TrackedDownload.DownloadItem.DownloadId,
SourceTitle = message.TrackedDownload.DownloadItem.OutputPath.ToString(),
Date = DateTime.UtcNow,