Skip to content

Commit

Permalink
Avoid import loop for already imported movies
Browse files Browse the repository at this point in the history
(cherry picked from commit b183743d9f0a0b15e4a9db0a9d3d2d1c238b0d9c)

Closes #9325
  • Loading branch information
mynameisbogdan committed Feb 2, 2024
1 parent 9ffa1cc commit 20ac0bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -115,7 +115,7 @@ public void should_reject_if_episode_imported_after_being_grabbed()

GivenHistory(history);

Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeTrue();
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeFalse();
}
}
}
Expand Up @@ -67,6 +67,11 @@ public Decision IsSatisfiedBy(LocalMovie localMovie, DownloadClientItem download
return Decision.Reject("Movie file already imported at {0}", lastImported.Date.ToLocalTime());
}
}
else
{
_logger.Debug("Movie file previously imported at {0}", lastImported.Date);
return Decision.Reject("Movie file already imported at {0}", lastImported.Date.ToLocalTime());
}

return Decision.Accept();
}
Expand Down

0 comments on commit 20ac0bb

Please sign in to comment.