mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Do not allow already available movies to be imported via the watchlist
This commit is contained in:
parent
0492e71ab7
commit
7ec8939cdf
4 changed files with 68 additions and 16 deletions
|
@ -54,6 +54,15 @@ namespace Ombi.Core.Rule.Rules.Request
|
|||
// looks like we have a match on the TVDbID
|
||||
return CheckExistingContent(tvRequest, anyMovieDbMatches);
|
||||
}
|
||||
if (obj.RequestType == RequestType.Movie)
|
||||
{
|
||||
var movie = (MovieRequests)obj;
|
||||
var exists = _plexContent.GetAll().Where(x => x.Type == MediaType.Movie).Any(x => x.TheMovieDbId == movie.Id.ToString() || x.TheMovieDbId == movie.TheMovieDbId.ToString());
|
||||
if (exists)
|
||||
{
|
||||
return Fail(ErrorCode.AlreadyRequested, "This movie is already available." );
|
||||
}
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue