mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Don't run DownloadCompletedEvent if DownloadItem not Completed.
This commit is contained in:
parent
6abda8adef
commit
1e2ba691ed
@ -79,7 +79,7 @@ private IEnumerable<DownloadClientItem> GetQueue()
|
|||||||
queueItem.Category = item.Category;
|
queueItem.Category = item.Category;
|
||||||
queueItem.DownloadClient = Definition.Name;
|
queueItem.DownloadClient = Definition.Name;
|
||||||
|
|
||||||
if (globalStatus.DownloadPaused || remainingSize == pausedSize)
|
if (globalStatus.DownloadPaused || remainingSize == pausedSize && remainingSize != 0)
|
||||||
{
|
{
|
||||||
queueItem.Status = DownloadItemStatus.Paused;
|
queueItem.Status = DownloadItemStatus.Paused;
|
||||||
queueItem.RemainingSize = remainingSize;
|
queueItem.RemainingSize = remainingSize;
|
||||||
|
@ -90,7 +90,7 @@ protected virtual void DeleteItemData(string downloadId)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.OutputPath == null)
|
if (item.OutputPath.IsEmpty)
|
||||||
{
|
{
|
||||||
_logger.Trace("[{0}] Doesn't have an outputPath, skipping delete data.", item.Title);
|
_logger.Trace("[{0}] Doesn't have an outputPath, skipping delete data.", item.Title);
|
||||||
return;
|
return;
|
||||||
|
@ -35,7 +35,10 @@ public DownloadEventHub(IConfigService configService,
|
|||||||
|
|
||||||
public void Handle(DownloadCompletedEvent message)
|
public void Handle(DownloadCompletedEvent message)
|
||||||
{
|
{
|
||||||
if (message.TrackedDownload.DownloadItem.Removed || message.TrackedDownload.DownloadItem.IsReadOnly || !_configService.RemoveCompletedDownloads)
|
if (!_configService.RemoveCompletedDownloads ||
|
||||||
|
message.TrackedDownload.DownloadItem.Removed ||
|
||||||
|
message.TrackedDownload.DownloadItem.IsReadOnly ||
|
||||||
|
message.TrackedDownload.DownloadItem.Status == DownloadItemStatus.Downloading)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user