|
|
@ -58,6 +58,9 @@ namespace Ombi.Core.Rule.Rules.Request
|
|
|
|
var requestLog = _requestLog.GetAll().Where(x => x.UserId == obj.RequestedUserId);
|
|
|
|
var requestLog = _requestLog.GetAll().Where(x => x.UserId == obj.RequestedUserId);
|
|
|
|
if (obj.RequestType == RequestType.Movie)
|
|
|
|
if (obj.RequestType == RequestType.Movie)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (movieLimit <= 0)
|
|
|
|
|
|
|
|
return Success();
|
|
|
|
|
|
|
|
|
|
|
|
var movieLogs = requestLog.Where(x => x.RequestType == RequestType.Movie);
|
|
|
|
var movieLogs = requestLog.Where(x => x.RequestType == RequestType.Movie);
|
|
|
|
|
|
|
|
|
|
|
|
// Count how many requests in the past 7 days
|
|
|
|
// Count how many requests in the past 7 days
|
|
|
@ -70,6 +73,9 @@ namespace Ombi.Core.Rule.Rules.Request
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (episodeLimit <= 0)
|
|
|
|
|
|
|
|
return Success();
|
|
|
|
|
|
|
|
|
|
|
|
var child = (ChildRequests) obj;
|
|
|
|
var child = (ChildRequests) obj;
|
|
|
|
var requestCount = 0;
|
|
|
|
var requestCount = 0;
|
|
|
|
// Get the count of requests to be made
|
|
|
|
// Get the count of requests to be made
|
|
|
@ -92,4 +98,4 @@ namespace Ombi.Core.Rule.Rules.Request
|
|
|
|
return Success();
|
|
|
|
return Success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|