mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 23:42:36 -07:00
Work on the TV request. the latest
parameter is not being passed into the requestTvshow
This commit is contained in:
parent
3d6da12fb5
commit
70362b908f
5 changed files with 73 additions and 15 deletions
|
@ -37,7 +37,7 @@ namespace RequestPlex.UI.Modules
|
|||
Post["search/request/tv"] = parameters =>
|
||||
{
|
||||
var tvShowId = (int)Request.Form.tvId;
|
||||
var latest = (bool)Request.Form.latestSeason;
|
||||
var latest = (bool)Request.Form.latest;
|
||||
return RequestTvShow(tvShowId, latest);
|
||||
};
|
||||
}
|
||||
|
@ -94,6 +94,10 @@ namespace RequestPlex.UI.Modules
|
|||
{
|
||||
// Latest send to Sonarr and no need to store in DB
|
||||
var s = new SettingsService();
|
||||
if (s.CheckRequest(showId))
|
||||
{
|
||||
return Response.AsJson(new { Result = false, Message = "TV Show has already been requested!" });
|
||||
}
|
||||
s.AddRequest(showId, RequestType.TvShow);
|
||||
return Response.AsJson(new {Result = true });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue