diff --git a/PlexRequests.UI/Content/search.js b/PlexRequests.UI/Content/search.js index ea22b5ce5..e6772061f 100644 --- a/PlexRequests.UI/Content/search.js +++ b/PlexRequests.UI/Content/search.js @@ -472,6 +472,7 @@ $(function () { disableTvRequestsByEpisode: result.disableTvRequestsByEpisode, disableTvRequestsBySeason: result.disableTvRequestsBySeason }; + return context; } diff --git a/PlexRequests.UI/Models/SearchTvShowViewModel.cs b/PlexRequests.UI/Models/SearchTvShowViewModel.cs index e552873f7..45bd0c8fd 100644 --- a/PlexRequests.UI/Models/SearchTvShowViewModel.cs +++ b/PlexRequests.UI/Models/SearchTvShowViewModel.cs @@ -55,5 +55,7 @@ namespace PlexRequests.UI.Models public int SiteRating { get; set; } public List Episodes { get; set; } public bool TvFullyAvailable { get; set; } + public bool DisableTvRequestsByEpisode { get; set; } + public bool DisableTvRequestsBySeason { get; set; } } } \ No newline at end of file diff --git a/PlexRequests.UI/Modules/SearchModule.cs b/PlexRequests.UI/Modules/SearchModule.cs index ca728613c..d03339fa0 100644 --- a/PlexRequests.UI/Modules/SearchModule.cs +++ b/PlexRequests.UI/Modules/SearchModule.cs @@ -290,8 +290,10 @@ namespace PlexRequests.UI.Modules private async Task SearchTvShow(string searchTerm) { + Analytics.TrackEventAsync(Category.Search, Action.TvShow, searchTerm, Username, CookieHelper.GetAnalyticClientId(Cookies)); var plexSettings = await PlexService.GetSettingsAsync(); + var prSettings = await PrService.GetSettingsAsync(); var providerId = string.Empty; var apiTv = new List(); @@ -336,7 +338,9 @@ namespace PlexRequests.UI.Modules Runtime = t.show.runtime.ToString(), SeriesId = t.show.id, SeriesName = t.show.name, - Status = t.show.status + Status = t.show.status, + DisableTvRequestsByEpisode = prSettings.DisableTvRequestsByEpisode, + DisableTvRequestsBySeason = prSettings.DisableTvRequestsBySeason };