mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 15:32:37 -07:00
Adding the imdb when requesting
This commit is contained in:
parent
59cf379d56
commit
f1987ecedb
1 changed files with 6 additions and 1 deletions
|
@ -182,6 +182,7 @@ namespace PlexRequests.UI.Modules
|
||||||
var movieInfo = movieApi.GetMovieInformation(movieId).Result;
|
var movieInfo = movieApi.GetMovieInformation(movieId).Result;
|
||||||
Log.Trace("Getting movie info from TheMovieDb");
|
Log.Trace("Getting movie info from TheMovieDb");
|
||||||
Log.Trace(movieInfo.DumpJson);
|
Log.Trace(movieInfo.DumpJson);
|
||||||
|
//#if !DEBUG
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (CheckIfTitleExistsInPlex(movieInfo.Title, movieInfo.ReleaseDate?.Year.ToString()))
|
if (CheckIfTitleExistsInPlex(movieInfo.Title, movieInfo.ReleaseDate?.Year.ToString()))
|
||||||
|
@ -193,6 +194,7 @@ namespace PlexRequests.UI.Modules
|
||||||
{
|
{
|
||||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"We could not check if {movieInfo.Title} is in Plex, are you sure it's correctly setup?" });
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"We could not check if {movieInfo.Title} is in Plex, are you sure it's correctly setup?" });
|
||||||
}
|
}
|
||||||
|
//#endif
|
||||||
|
|
||||||
var model = new RequestedModel
|
var model = new RequestedModel
|
||||||
{
|
{
|
||||||
|
@ -267,6 +269,7 @@ namespace PlexRequests.UI.Modules
|
||||||
var tvApi = new TvMazeApi();
|
var tvApi = new TvMazeApi();
|
||||||
|
|
||||||
var showInfo = tvApi.ShowLookupByTheTvDbId(showId);
|
var showInfo = tvApi.ShowLookupByTheTvDbId(showId);
|
||||||
|
//#if !DEBUG
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (CheckIfTitleExistsInPlex(showInfo.name, showInfo.premiered?.Substring(0, 4))) // Take only the year Format = 2014-01-01
|
if (CheckIfTitleExistsInPlex(showInfo.name, showInfo.premiered?.Substring(0, 4))) // Take only the year Format = 2014-01-01
|
||||||
|
@ -278,6 +281,7 @@ namespace PlexRequests.UI.Modules
|
||||||
{
|
{
|
||||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"We could not check if {showInfo.name} is in Plex, are you sure it's correctly setup?" });
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"We could not check if {showInfo.name} is in Plex, are you sure it's correctly setup?" });
|
||||||
}
|
}
|
||||||
|
//#endif
|
||||||
|
|
||||||
DateTime firstAir;
|
DateTime firstAir;
|
||||||
DateTime.TryParse(showInfo.premiered, out firstAir);
|
DateTime.TryParse(showInfo.premiered, out firstAir);
|
||||||
|
@ -295,7 +299,8 @@ namespace PlexRequests.UI.Modules
|
||||||
Approved = false,
|
Approved = false,
|
||||||
RequestedBy = Session[SessionKeys.UsernameKey].ToString(),
|
RequestedBy = Session[SessionKeys.UsernameKey].ToString(),
|
||||||
Issues = IssueState.None,
|
Issues = IssueState.None,
|
||||||
LatestTv = latest
|
LatestTv = latest,
|
||||||
|
ImdbId = showInfo.externals?.imdb ?? string.Empty
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue