|
|
|
@ -349,8 +349,7 @@ namespace PlexRequests.UI.Modules
|
|
|
|
|
providerId = viewT.Id.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var plexShow = Checker.GetTvShow(plexTvShows.ToArray(), t.show.name, t.show.premiered?.Substring(0, 4),
|
|
|
|
|
providerId);
|
|
|
|
|
var plexShow = Checker.GetTvShow(plexTvShows.ToArray(), t.show.name, t.show.premiered?.Substring(0, 4), providerId);
|
|
|
|
|
if (plexShow != null)
|
|
|
|
|
{
|
|
|
|
|
viewT.Available = true;
|
|
|
|
@ -590,7 +589,7 @@ namespace PlexRequests.UI.Modules
|
|
|
|
|
RequestedUsers = new List<string> { Username },
|
|
|
|
|
Issues = IssueState.None,
|
|
|
|
|
ImdbId = showInfo.externals?.imdb ?? string.Empty,
|
|
|
|
|
SeasonCount = showInfo.seasonCount,
|
|
|
|
|
SeasonCount = showInfo.Season.Count,
|
|
|
|
|
TvDbId = showId.ToString()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -703,7 +702,18 @@ namespace PlexRequests.UI.Modules
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (Checker.IsTvShowAvailable(shows.ToArray(), showInfo.name, showInfo.premiered?.Substring(0, 4), providerId, model.SeasonList))
|
|
|
|
|
if (plexSettings.EnableTvEpisodeSearching)
|
|
|
|
|
{
|
|
|
|
|
foreach (var s in showInfo.Season)
|
|
|
|
|
{
|
|
|
|
|
var result = Checker.IsEpisodeAvailable(showId.ToString(), s.SeasonNumber, s.EpisodeNumber);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"{fullShowName} {Resources.UI.Search_AlreadyInPlex}" });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Checker.IsTvShowAvailable(shows.ToArray(), showInfo.name, showInfo.premiered?.Substring(0, 4), providerId, model.SeasonList))
|
|
|
|
|
{
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"{fullShowName} {Resources.UI.Search_AlreadyInPlex}" });
|
|
|
|
|
}
|
|
|
|
|