mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 09:12:57 -07:00
Some fixes around the UI and managing requests #865
This commit is contained in:
parent
5d0e317315
commit
f6cd68ff28
8 changed files with 50 additions and 18 deletions
|
@ -62,6 +62,19 @@ namespace Ombi.Core.Engine
|
|||
};
|
||||
}
|
||||
|
||||
// Check if we have auto approved the request, if we have then mark the episodes as approved
|
||||
if (tvBuilder.ChildRequest.Approved)
|
||||
{
|
||||
foreach (var seasons in tvBuilder.ChildRequest.SeasonRequests)
|
||||
{
|
||||
foreach (var ep in seasons.Episodes)
|
||||
{
|
||||
ep.Approved = true;
|
||||
ep.Requested = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await Audit.Record(AuditType.Added, AuditArea.TvRequest, $"Added Request {tv.Title}", Username);
|
||||
|
||||
var existingRequest = await TvRepository.Get().FirstOrDefaultAsync(x => x.TvDbId == tv.Id);
|
||||
|
@ -97,8 +110,8 @@ namespace Ombi.Core.Engine
|
|||
tvBuilder.ChildRequest.Id = 0;
|
||||
return await AddExistingRequest(tvBuilder.ChildRequest, existingRequest);
|
||||
}
|
||||
// This is a new request
|
||||
|
||||
// This is a new request
|
||||
var newRequest = tvBuilder.CreateNewRequest(tv);
|
||||
return await AddRequest(newRequest.NewRequest);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue