|
|
@ -109,6 +109,7 @@ namespace NzbDrone.Core.Download
|
|
|
|
if (importResults.Empty())
|
|
|
|
if (importResults.Empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
trackedDownload.Warn("No files found are eligible for import in {0}", outputPath);
|
|
|
|
trackedDownload.Warn("No files found are eligible for import in {0}", outputPath);
|
|
|
|
|
|
|
|
trackedDownload.State = TrackedDownloadState.ImportPending;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -116,10 +117,6 @@ namespace NzbDrone.Core.Download
|
|
|
|
importResults.Count(c => c.Result == ImportResultType.Imported) >=
|
|
|
|
importResults.Count(c => c.Result == ImportResultType.Imported) >=
|
|
|
|
Math.Max(1, trackedDownload.RemoteAlbum.Albums.Sum(x => x.AlbumReleases.Value.Where(y => y.Monitored).Sum(z => z.TrackCount)));
|
|
|
|
Math.Max(1, trackedDownload.RemoteAlbum.Albums.Sum(x => x.AlbumReleases.Value.Where(y => y.Monitored).Sum(z => z.TrackCount)));
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine($"allimported: {allTracksImported}");
|
|
|
|
|
|
|
|
Console.WriteLine($"count: {importResults.Count(c => c.Result == ImportResultType.Imported)}");
|
|
|
|
|
|
|
|
Console.WriteLine($"max: {Math.Max(1, trackedDownload.RemoteAlbum.Albums.Sum(x => x.AlbumReleases.Value.Where(y => y.Monitored).Sum(z => z.TrackCount)))}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (allTracksImported)
|
|
|
|
if (allTracksImported)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
trackedDownload.State = TrackedDownloadState.Imported;
|
|
|
|
trackedDownload.State = TrackedDownloadState.Imported;
|
|
|
@ -148,11 +145,6 @@ namespace NzbDrone.Core.Download
|
|
|
|
|
|
|
|
|
|
|
|
trackedDownload.State = TrackedDownloadState.ImportPending;
|
|
|
|
trackedDownload.State = TrackedDownloadState.ImportPending;
|
|
|
|
|
|
|
|
|
|
|
|
if (importResults.Empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
trackedDownload.Warn("No files found are eligible for import in {0}", outputPath);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (importResults.Any(c => c.Result != ImportResultType.Imported))
|
|
|
|
if (importResults.Any(c => c.Result != ImportResultType.Imported))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
trackedDownload.State = TrackedDownloadState.ImportFailed;
|
|
|
|
trackedDownload.State = TrackedDownloadState.ImportFailed;
|
|
|
|