From f1987ecedb960d150b6912582b5a263cf82b08f2 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 22 Mar 2016 14:16:46 +0000 Subject: [PATCH] Adding the imdb when requesting --- PlexRequests.UI/Modules/SearchModule.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PlexRequests.UI/Modules/SearchModule.cs b/PlexRequests.UI/Modules/SearchModule.cs index 92a7d1b36..7d1d0dcab 100644 --- a/PlexRequests.UI/Modules/SearchModule.cs +++ b/PlexRequests.UI/Modules/SearchModule.cs @@ -182,6 +182,7 @@ namespace PlexRequests.UI.Modules var movieInfo = movieApi.GetMovieInformation(movieId).Result; Log.Trace("Getting movie info from TheMovieDb"); Log.Trace(movieInfo.DumpJson); +//#if !DEBUG try { 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?" }); } +//#endif var model = new RequestedModel { @@ -267,6 +269,7 @@ namespace PlexRequests.UI.Modules var tvApi = new TvMazeApi(); var showInfo = tvApi.ShowLookupByTheTvDbId(showId); +//#if !DEBUG try { 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?" }); } +//#endif DateTime firstAir; DateTime.TryParse(showInfo.premiered, out firstAir); @@ -295,7 +299,8 @@ namespace PlexRequests.UI.Modules Approved = false, RequestedBy = Session[SessionKeys.UsernameKey].ToString(), Issues = IssueState.None, - LatestTv = latest + LatestTv = latest, + ImdbId = showInfo.externals?.imdb ?? string.Empty };