mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 01:38:24 +00:00
Fixed episode status of recently imported episodes.
This commit is contained in:
parent
8d12630856
commit
8927a938b7
3 changed files with 7 additions and 6 deletions
|
@ -61,8 +61,8 @@ public void old_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
|||
|
||||
[TestCase(1, false, false, EpisodeStatusType.Downloading)]
|
||||
[TestCase(-2, false, false, EpisodeStatusType.Downloading)]
|
||||
[TestCase(1, true, false, EpisodeStatusType.Downloading)]
|
||||
[TestCase(1, true, true, EpisodeStatusType.Downloading)]
|
||||
[TestCase(1, true, false, EpisodeStatusType.Ready)]
|
||||
[TestCase(1, true, true, EpisodeStatusType.Ready)]
|
||||
[TestCase(1, false, true, EpisodeStatusType.Downloading)]
|
||||
public void recent_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
||||
EpisodeStatusType status)
|
||||
|
|
|
@ -212,6 +212,7 @@ public void nzbsorg_search_returns_valid_results(string title, int season, int e
|
|||
|
||||
[TestCase("simpsons", 21, 23)]
|
||||
[TestCase("Hawaii Five-0 (2010)", 1, 1)]
|
||||
[TestCase("In plain Sight", 1, 11)]
|
||||
public void newzbin_search_returns_valid_results(string title, int season, int episode)
|
||||
{
|
||||
var mocker = new AutoMoqer();
|
||||
|
|
|
@ -37,14 +37,14 @@ public EpisodeStatusType Status
|
|||
{
|
||||
get
|
||||
{
|
||||
|
||||
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
|
||||
|
||||
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
|
||||
{
|
||||
return EpisodeStatusType.Downloading;
|
||||
}
|
||||
|
||||
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
|
||||
|
||||
|
||||
|
||||
if (Ignored) return EpisodeStatusType.Ignored;
|
||||
|
||||
if (AirDate != null && AirDate.Value.Date < DateTime.Now)
|
||||
|
|
Loading…
Reference in a new issue