mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Manually mark a release as failed to start failed download process (history details)
This commit is contained in:
parent
70127125c2
commit
da0f04d4c8
5 changed files with 59 additions and 7 deletions
|
@ -9,7 +9,12 @@ using NzbDrone.Core.Messaging.Events;
|
|||
|
||||
namespace NzbDrone.Core.Download
|
||||
{
|
||||
public class FailedDownloadService : IExecute<FailedDownloadCommand>
|
||||
public interface IFailedDownloadService
|
||||
{
|
||||
void MarkAsFailed(int historyId);
|
||||
}
|
||||
|
||||
public class FailedDownloadService : IFailedDownloadService, IExecute<FailedDownloadCommand>
|
||||
{
|
||||
private readonly IProvideDownloadClient _downloadClientProvider;
|
||||
private readonly IHistoryService _historyService;
|
||||
|
@ -37,6 +42,12 @@ namespace NzbDrone.Core.Download
|
|||
_downloadClient = _downloadClientProvider.GetDownloadClient();
|
||||
}
|
||||
|
||||
public void MarkAsFailed(int historyId)
|
||||
{
|
||||
var item = _historyService.Get(historyId);
|
||||
PublishDownloadFailedEvent(new List<History.History> {item}, "Manually marked as failed");
|
||||
}
|
||||
|
||||
private void CheckForFailedDownloads()
|
||||
{
|
||||
if (!_configService.EnableFailedDownloadHandling)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue