New: Show processing time for pending items on Calendar and Queue

This commit is contained in:
Mark McDowall
2014-08-01 18:08:32 -07:00
parent 3b26e82644
commit c21ffcb5e4
7 changed files with 47 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Collections.Generic;
using NLog;
using NzbDrone.Core.Download;
@@ -52,11 +53,16 @@ namespace NzbDrone.Core.Queue
RemoteEpisode = queueItem.DownloadItem.RemoteEpisode
};
if (queueItem.HasError)
if (queueItem.HasError)
{
queue.ErrorMessage = queueItem.StatusMessage;
}
if (queue.Timeleft.HasValue)
{
queue.EstimatedCompletionTime = DateTime.UtcNow.Add(queue.Timeleft.Value);
}
queued.Add(queue);
}
}