Skip to content

Commit 20ac0bb

Browse files
committedFeb 2, 2024
Avoid import loop for already imported movies
(cherry picked from commit b183743d9f0a0b15e4a9db0a9d3d2d1c238b0d9c) Closes #9325
1 parent 9ffa1cc commit 20ac0bb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/AlreadyImportedSpecificationFixture.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void should_reject_if_episode_imported_after_being_grabbed()
115115

116116
GivenHistory(history);
117117

118-
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeTrue();
118+
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeFalse();
119119
}
120120
}
121121
}

‎src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/AlreadyImportedSpecification.cs

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public Decision IsSatisfiedBy(LocalMovie localMovie, DownloadClientItem download
6767
return Decision.Reject("Movie file already imported at {0}", lastImported.Date.ToLocalTime());
6868
}
6969
}
70+
else
71+
{
72+
_logger.Debug("Movie file previously imported at {0}", lastImported.Date);
73+
return Decision.Reject("Movie file already imported at {0}", lastImported.Date.ToLocalTime());
74+
}
7075

7176
return Decision.Accept();
7277
}

0 commit comments

Comments
 (0)
Please sign in to comment.