Fixed: Queue returning nullref when RemoteAlbum null

This commit is contained in:
Qstick 2019-03-01 21:52:05 -05:00
parent 42c16c227e
commit ee7addd624
1 changed files with 1 additions and 3 deletions

View File

@ -72,7 +72,7 @@ namespace NzbDrone.Core.Queue
var queue = new Queue var queue = new Queue
{ {
Artist = trackedDownload.RemoteAlbum.Artist, Artist = trackedDownload.RemoteAlbum?.Artist,
Album = album, Album = album,
Language = trackedDownload.RemoteAlbum?.ParsedAlbumInfo.Language ?? Language.Unknown, Language = trackedDownload.RemoteAlbum?.ParsedAlbumInfo.Language ?? Language.Unknown,
Quality = trackedDownload.RemoteAlbum?.ParsedAlbumInfo.Quality ?? new QualityModel(Quality.Unknown), Quality = trackedDownload.RemoteAlbum?.ParsedAlbumInfo.Quality ?? new QualityModel(Quality.Unknown),
@ -101,7 +101,6 @@ namespace NzbDrone.Core.Queue
queue.Id = HashConverter.GetHashInt31(string.Format("trackedDownload-{0}", trackedDownload.DownloadItem.DownloadId)); queue.Id = HashConverter.GetHashInt31(string.Format("trackedDownload-{0}", trackedDownload.DownloadItem.DownloadId));
} }
if (queue.Timeleft.HasValue) if (queue.Timeleft.HasValue)
{ {
queue.EstimatedCompletionTime = DateTime.UtcNow.Add(queue.Timeleft.Value); queue.EstimatedCompletionTime = DateTime.UtcNow.Add(queue.Timeleft.Value);
@ -117,6 +116,5 @@ namespace NzbDrone.Core.Queue
_eventAggregator.PublishEvent(new QueueUpdatedEvent()); _eventAggregator.PublishEvent(new QueueUpdatedEvent());
} }
} }
} }