mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 15:47:20 +02:00
Fixed: Hopefully fixed issue where a null downloadId or title would cause no downloads to be tracked.
Fixes #3260
This commit is contained in:
parent
ff894d5210
commit
44842a4e6b
@ -44,6 +44,20 @@ public TrackedDownload Find(string downloadId)
|
||||
|
||||
public TrackedDownload TrackDownload(DownloadClientDefinition downloadClient, DownloadClientItem downloadItem)
|
||||
{
|
||||
if (downloadItem.DownloadId.IsNullOrWhiteSpace())
|
||||
{
|
||||
_logger.Warn("The following download client item ({0}) has no download hash (id), so it cannot be tracked: {1}",
|
||||
downloadClient.Name, downloadItem.Title);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (downloadItem.Title.IsNullOrWhiteSpace())
|
||||
{
|
||||
_logger.Warn("The following download client item ({0}) has no title so it cannot be tracked: {1}",
|
||||
downloadClient.Name, downloadItem.Title);
|
||||
return null;
|
||||
}
|
||||
|
||||
var existingItem = Find(downloadItem.DownloadId);
|
||||
|
||||
if (existingItem != null && existingItem.State != TrackedDownloadStage.Downloading)
|
||||
|
Loading…
Reference in New Issue
Block a user