diff --git a/Ombi.Core.Migration/Migrations/Version2200.cs b/Ombi.Core.Migration/Migrations/Version2200.cs index d9069b8d7..d52e1654b 100644 --- a/Ombi.Core.Migration/Migrations/Version2200.cs +++ b/Ombi.Core.Migration/Migrations/Version2200.cs @@ -53,9 +53,9 @@ namespace Ombi.Core.Migration.Migrations } public int Version => 22000; - private ISettingsService Customization { get; } + private ISettingsService Customization { get; } private ISettingsService PlexSettings { get; } - private IRepository Log { get; } + private IRepository Log { get; } private IRepository PlexContent { get; } private IRepository PlexEpisodes { get; } @@ -68,6 +68,7 @@ namespace Ombi.Core.Migration.Migrations AddNewColumns(con); UpdateSchema(con, Version); UpdateRecentlyAdded(con); + } private void UpdateRecentlyAdded(IDbConnection con) @@ -124,10 +125,9 @@ namespace Ombi.Core.Migration.Migrations { var settings = Customization.GetSettings(); - settings.EnableIssues = true; - + settings.EnableIssues = true; + settings.EnableNetflixResults = true; Customization.SaveSettings(settings); - } } } diff --git a/Ombi.Core/SettingModels/CustomizationSettings.cs b/Ombi.Core/SettingModels/CustomizationSettings.cs index 98468c9be..a562669a5 100644 --- a/Ombi.Core/SettingModels/CustomizationSettings.cs +++ b/Ombi.Core/SettingModels/CustomizationSettings.cs @@ -55,6 +55,6 @@ namespace Ombi.Core.SettingModels public bool NewSearch { get; set; } public bool EnableIssues { get; set; } - + public bool EnableNetflixResults { get; set; } } } \ No newline at end of file diff --git a/Ombi.Services/Jobs/RecentlyAddedNewsletter/EmbyRecentlyAddedNewsletter.cs b/Ombi.Services/Jobs/RecentlyAddedNewsletter/EmbyRecentlyAddedNewsletter.cs index fbd714e8a..fed884060 100644 --- a/Ombi.Services/Jobs/RecentlyAddedNewsletter/EmbyRecentlyAddedNewsletter.cs +++ b/Ombi.Services/Jobs/RecentlyAddedNewsletter/EmbyRecentlyAddedNewsletter.cs @@ -116,6 +116,7 @@ namespace Ombi.Services.Jobs.RecentlyAddedNewsletter var filteredMovies = movie.Where(m => recentlyAdded.All(x => x.ProviderId != m.ProviderId)).ToList(); var filteredEp = episodes.Where(m => recentlyAdded.All(x => x.ProviderId != m.ProviderId)).ToList(); + var filteredSeries = series.Where(m => recentlyAdded.All(x => x.ProviderId != m.ProviderId)).ToList(); var info = new List(); foreach (var m in filteredMovies) @@ -133,7 +134,7 @@ namespace Ombi.Services.Jobs.RecentlyAddedNewsletter newsletter.MovieCount = info.Count; info.Clear(); - foreach (var t in series) + foreach (var t in filteredSeries) { var i = Api.GetInformation(t.EmbyId, Ombi.Api.Models.Emby.EmbyMediaType.Series, embySettings.ApiKey, embySettings.AdministratorId, embySettings.FullUri); diff --git a/Ombi.Services/Jobs/RecentlyAddedNewsletter/PlexRecentlyAddedNewsletter.cs b/Ombi.Services/Jobs/RecentlyAddedNewsletter/PlexRecentlyAddedNewsletter.cs index e1abb037a..8bf2c548b 100644 --- a/Ombi.Services/Jobs/RecentlyAddedNewsletter/PlexRecentlyAddedNewsletter.cs +++ b/Ombi.Services/Jobs/RecentlyAddedNewsletter/PlexRecentlyAddedNewsletter.cs @@ -49,7 +49,8 @@ using PlexMediaType = Ombi.Store.Models.Plex.PlexMediaType; namespace Ombi.Services.Jobs.RecentlyAddedNewsletter { - public class PlexRecentlyAddedNewsletter : HtmlTemplateGenerator, IPlexNewsletter + public class + PlexRecentlyAddedNewsletter : HtmlTemplateGenerator, IPlexNewsletter { public PlexRecentlyAddedNewsletter(IPlexApi api, ISettingsService plexSettings, ISettingsService email, diff --git a/Ombi.UI/Content/search.js b/Ombi.UI/Content/search.js index ec215b159..eda0ebd81 100644 --- a/Ombi.UI/Content/search.js +++ b/Ombi.UI/Content/search.js @@ -24,6 +24,7 @@ Function.prototype.bind = function (parent) { $(function () { + var netflixEnabled = $('#enableNetflix').text() == 'True'; var useNewSearch = $('#useNewSearch').text() == 'True'; var searchSource = useNewSearch ? $("#search-templateNew").html() : $("#search-template").html(); var seasonsSource = $("#seasons-template").html(); @@ -416,6 +417,9 @@ $(function () { }; function checkNetflix(title, id) { + if (!netflixEnabled) { + return; + } var url = createBaseUrl(base, '/searchextension/netflix/' + title); $.ajax(url).success(function (results) { diff --git a/Ombi.UI/Views/Customization/Customization.cshtml b/Ombi.UI/Views/Customization/Customization.cshtml index 39fecbfc3..257f2bc89 100644 --- a/Ombi.UI/Views/Customization/Customization.cshtml +++ b/Ombi.UI/Views/Customization/Customization.cshtml @@ -106,6 +106,7 @@ @*@Html.Checkbox(Model.Settings.NewSearch, "NewSearch", "Use New Search")*@ @Html.Checkbox(Model.Settings.EnableIssues, "EnableIssues", "Enable Issues") + @Html.Checkbox(Model.Settings.EnableNetflixResults, "EnableNetflixResults", "Enable Netflix results to be shown in the search")
diff --git a/Ombi.UI/Views/Search/Index.cshtml b/Ombi.UI/Views/Search/Index.cshtml index 4e0c6df50..576cd6a6d 100644 --- a/Ombi.UI/Views/Search/Index.cshtml +++ b/Ombi.UI/Views/Search/Index.cshtml @@ -14,6 +14,7 @@
+

@UI.Search_Title

@string.Format(UI.Search_Paragraph, Model.Emby ? "Emby" : "Plex")