mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added two new Episode Statuses - Unpacking and Failed.
Tests added to support new Statuses. PostDownloadScanJob will update PostDownloadStatus for failed or unpacking. ImportFile will set the PostDownloadStatus to Processed when added to the database.
This commit is contained in:
parent
c534d47b0a
commit
5098ea3249
15 changed files with 234 additions and 10 deletions
|
@ -23,6 +23,8 @@ namespace NzbDrone.Core.Repository
|
|||
|
||||
public Boolean Ignored { get; set; }
|
||||
|
||||
public PostDownloadStatusType PostDownloadStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the grab date.
|
||||
/// </summary>
|
||||
|
@ -39,15 +41,23 @@ namespace NzbDrone.Core.Repository
|
|||
{
|
||||
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
|
||||
|
||||
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
|
||||
if (GrabDate != null)
|
||||
{
|
||||
return EpisodeStatusType.Downloading;
|
||||
if (PostDownloadStatus == PostDownloadStatusType.Unpacking)
|
||||
return EpisodeStatusType.Unpacking;
|
||||
|
||||
if (PostDownloadStatus == PostDownloadStatusType.Failed)
|
||||
return EpisodeStatusType.Failed;
|
||||
|
||||
if (GrabDate.Value.AddDays(1) >= DateTime.Now)
|
||||
return EpisodeStatusType.Downloading;
|
||||
}
|
||||
|
||||
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
|
||||
return EpisodeStatusType.Downloading;
|
||||
|
||||
if (AirDate != null && AirDate.Value.Date < DateTime.Now)
|
||||
{
|
||||
return EpisodeStatusType.Missing;
|
||||
}
|
||||
|
||||
return EpisodeStatusType.NotAired;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue