mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Compare commits
1 Commits
sonarr-pul
...
sonarr-pul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48b9f0a07a |
@@ -20,7 +20,7 @@ variables:
|
|||||||
innoVersion: '6.2.0'
|
innoVersion: '6.2.0'
|
||||||
windowsImage: 'windows-2022'
|
windowsImage: 'windows-2022'
|
||||||
linuxImage: 'ubuntu-20.04'
|
linuxImage: 'ubuntu-20.04'
|
||||||
macImage: 'macOS-12'
|
macImage: 'macOS-11'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ namespace NzbDrone.Core.Download
|
|||||||
|
|
||||||
public void Check(TrackedDownload trackedDownload)
|
public void Check(TrackedDownload trackedDownload)
|
||||||
{
|
{
|
||||||
// Only process tracked downloads that are still downloading
|
// Only process tracked downloads that are still downloading or import is blocked (if they fail after attempting to be processed)
|
||||||
if (trackedDownload.State != TrackedDownloadState.Downloading)
|
if (trackedDownload.State != TrackedDownloadState.Downloading && trackedDownload.State != TrackedDownloadState.ImportBlocked)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
|
|||||||
{
|
{
|
||||||
var trackedDownload = _trackedDownloadService.TrackDownload((DownloadClientDefinition)downloadClient.Definition, downloadItem);
|
var trackedDownload = _trackedDownloadService.TrackDownload((DownloadClientDefinition)downloadClient.Definition, downloadItem);
|
||||||
|
|
||||||
if (trackedDownload != null && trackedDownload.State == TrackedDownloadState.Downloading)
|
if (trackedDownload is { State: TrackedDownloadState.Downloading or TrackedDownloadState.ImportBlocked })
|
||||||
{
|
{
|
||||||
_failedDownloadService.Check(trackedDownload);
|
_failedDownloadService.Check(trackedDownload);
|
||||||
_completedDownloadService.Check(trackedDownload);
|
_completedDownloadService.Check(trackedDownload);
|
||||||
|
|||||||
@@ -1,26 +1,18 @@
|
|||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Instrumentation;
|
||||||
using NzbDrone.Core.Instrumentation;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Housekeeping.Housekeepers
|
namespace NzbDrone.Core.Housekeeping.Housekeepers
|
||||||
{
|
{
|
||||||
public class TrimLogDatabase : IHousekeepingTask
|
public class TrimLogDatabase : IHousekeepingTask
|
||||||
{
|
{
|
||||||
private readonly ILogRepository _logRepo;
|
private readonly ILogRepository _logRepo;
|
||||||
private readonly IConfigFileProvider _configFileProvider;
|
|
||||||
|
|
||||||
public TrimLogDatabase(ILogRepository logRepo, IConfigFileProvider configFileProvider)
|
public TrimLogDatabase(ILogRepository logRepo)
|
||||||
{
|
{
|
||||||
_logRepo = logRepo;
|
_logRepo = logRepo;
|
||||||
_configFileProvider = configFileProvider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clean()
|
public void Clean()
|
||||||
{
|
{
|
||||||
if (!_configFileProvider.LogDbEnabled)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logRepo.Trim();
|
_logRepo.Trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user