diff --git a/Ombi.Api.Interfaces/IRadarrApi.cs b/Ombi.Api.Interfaces/IRadarrApi.cs index fc20c8d43..f1b015d31 100644 --- a/Ombi.Api.Interfaces/IRadarrApi.cs +++ b/Ombi.Api.Interfaces/IRadarrApi.cs @@ -8,7 +8,7 @@ namespace Ombi.Api.Interfaces public interface IRadarrApi { RadarrAddMovie AddMovie(int tmdbId, string title, int year, int qualityId, string rootPath, string apiKey, Uri baseUrl, bool searchNow = false); - RadarrMovieContainer GetMovies(string apiKey, Uri baseUrl); + List GetMovies(string apiKey, Uri baseUrl); List GetProfiles(string apiKey, Uri baseUrl); SystemStatus SystemStatus(string apiKey, Uri baseUrl); List GetRootFolders(string apiKey, Uri baseUrl); diff --git a/Ombi.Api.Models/Radarr/RadarrMovieContainer.cs b/Ombi.Api.Models/Radarr/RadarrMovieContainer.cs index fea472db7..f1ae0d745 100644 --- a/Ombi.Api.Models/Radarr/RadarrMovieContainer.cs +++ b/Ombi.Api.Models/Radarr/RadarrMovieContainer.cs @@ -29,6 +29,9 @@ using System.Collections.Generic; namespace Ombi.Api.Models.Radarr { + /// + /// This is not used now... Keeping it here incase Radarr changes their mind again. + /// public class RadarrMovieContainer { public int page { get; set; } diff --git a/Ombi.Api/RadarrApi.cs b/Ombi.Api/RadarrApi.cs index 9d5a34e9a..1840f40a0 100644 --- a/Ombi.Api/RadarrApi.cs +++ b/Ombi.Api/RadarrApi.cs @@ -152,7 +152,7 @@ namespace Ombi.Api } - public RadarrMovieContainer GetMovies(string apiKey, Uri baseUrl) + public List GetMovies(string apiKey, Uri baseUrl) { var request = new RestRequest { Resource = "/api/movie", Method = Method.GET }; request.AddHeader("X-Api-Key", apiKey); @@ -165,7 +165,7 @@ namespace Ombi.Api var obj = policy.Execute(() => Api.Execute(request, baseUrl)); - return JsonConvert.DeserializeObject(obj.Content); + return JsonConvert.DeserializeObject>(obj.Content); } } } \ No newline at end of file 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/RadarrCacher.cs b/Ombi.Services/Jobs/RadarrCacher.cs index e781c997f..0be1faa7b 100644 --- a/Ombi.Services/Jobs/RadarrCacher.cs +++ b/Ombi.Services/Jobs/RadarrCacher.cs @@ -67,7 +67,7 @@ namespace Ombi.Services.Jobs if (movies != null) { var movieIds = new List(); - foreach (var m in movies.records) + foreach (var m in movies) { if (m.tmdbId > 0) { diff --git a/Ombi.Services/Jobs/RecentlyAddedNewsletter/EmbyRecentlyAddedNewsletter.cs b/Ombi.Services/Jobs/RecentlyAddedNewsletter/EmbyRecentlyAddedNewsletter.cs index 7bda0d5af..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); @@ -154,7 +155,7 @@ namespace Ombi.Services.Jobs.RecentlyAddedNewsletter Ombi.Api.Models.Emby.EmbyMediaType.Episode, embySettings.ApiKey, embySettings.AdministratorId, embySettings.FullUri); episodeList.Add(epInfo.EpisodeInformation); - Thread.Sleep(200); // Let's not try and overload the server + Thread.Sleep(600); // Let's not try and overload the server } item.EpisodeInformation = episodeList; } @@ -162,7 +163,7 @@ namespace Ombi.Services.Jobs.RecentlyAddedNewsletter { Log.Error( "Failed getting episode information, we may have overloaded Emby's api... Waiting and we will skip this one and go to the next"); - Thread.Sleep(500); + Thread.Sleep(1000); } } 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.Services/Notification/EmailMessageNotification.cs b/Ombi.Services/Notification/EmailMessageNotification.cs index 7f1a80f8d..cd85913dc 100644 --- a/Ombi.Services/Notification/EmailMessageNotification.cs +++ b/Ombi.Services/Notification/EmailMessageNotification.cs @@ -76,7 +76,7 @@ namespace Ombi.Services.Notification { Message = html, Subject = $"Ombi: New {model.RequestType.GetString()?.ToLower()} request for {model.Title}!", - To = model.UserEmail, + To = settings.RecipientEmail, }; message.Other.Add("PlainTextBody", $"Hello! The user '{model.User}' has requested the {model.RequestType.GetString()?.ToLower()} '{model.Title}'! Please log in to approve this request. Request Date: {model.DateTime.ToString("f")}"); @@ -96,7 +96,7 @@ namespace Ombi.Services.Notification { Message = html, Subject = $"Ombi: New issue for {model.Title}!", - To = model.UserEmail, + To = settings.RecipientEmail, }; message.Other.Add("PlainTextBody", $"Hello! The user '{model.User}' has reported a new issue {model.Body} for the title {model.Title}!"); @@ -118,7 +118,7 @@ namespace Ombi.Services.Notification { Message = html, Subject = $"Ombi: A request could not be added", - To = model.UserEmail, + To = settings.RecipientEmail, }; message.Other.Add("PlainTextBody", $"Hello! The user '{model.User}' has requested {model.Title} but it could not be added. This has been added into the requests queue and will keep retrying"); @@ -241,7 +241,7 @@ namespace Ombi.Services.Notification { Message = html, Subject = $"Ombi: Test", - To = model.UserEmail, + To = settings.RecipientEmail, }; message.Other.Add("PlainTextBody", "This is just a test! Success!"); 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/Resources/UI.de.resx b/Ombi.UI/Resources/UI.de.resx index 5b908f1b8..b90c69e83 100644 --- a/Ombi.UI/Resources/UI.de.resx +++ b/Ombi.UI/Resources/UI.de.resx @@ -124,7 +124,7 @@ Möchten Sie einen Film oder eine Serie schauen, die momentan noch nicht auf {0}ist? Dann loggen Sie sich unten ein und fordern Sie das Material an! - Ihre Login-Daten werden nur zur Authorisierung Ihres Plex-Konto verwendet. + Deine Login-Daten werden nur zur Authorisierung deines Plex-Konto verwendet. Benutzername @@ -172,7 +172,7 @@ Ausloggen - Es ist ein neues Update verfügbar! Hier Klicken + Es ist ein neues Update verfügbar! Klicke Englisch @@ -211,7 +211,7 @@ Alben - Möchten Sie etwas schauen, das derzeit nicht auf {0} ist?! Kein Problem! Suchen Sie unten einfach danach und fragen Sie es an! + Möchtest Du etwas schauen, das derzeit nicht auf {0} ist?! Kein Problem! Suche einfach unten danach und frage es an! Suche @@ -226,7 +226,7 @@ Momentan im Kino - Sende mir eine Benachrichtigung, wenn die Serien oder die Filme, die ich angefordert habe hinzugefügt wurden. + Sende mir eine Benachrichtigung, wenn die Serien oder die Filme, die ich angefordert habe, hinzugefügt wurden. Speichern @@ -283,7 +283,7 @@ Schliessen - Fügen Sie ein Problem hinzu + Fügen ein Problem hinzu Änderungen speichern @@ -298,7 +298,7 @@ Anfragen - Unten befinden sich alle Anfragen aller Benutzer. Hier ist auch der aktuelle Status des beantragten Mediums ersichtlich. + Unten befinden sich alle Anfragen aller Benutzer. Hier ist auch der aktuelle Status des beantragten Titels ersichtlich. Filme @@ -400,40 +400,40 @@ Verfügbar - Problemstellung + Problem wurde erfolgreich hinzugefügt! - wurde bereits angefragt! + wurde schon angefragt Wir konnten nicht prüfen ob {0} bereits auf {1}ist. Bist du sicher dass alles richtig installiert ist? - Etwas ging etwas schief beim hinzufügen des Filmes zu CouchPotato! Bitte überprüfe deine Einstellungen. + Etwas ging etwas schief beim Hinzufügen des Filmes zu CouchPotato! Bitte überprüfe deine Einstellungen. - Du hast deine wöchentliche Maximalanfragen für neue Filme erreicht. Bitte kontaktiere den Administrator. + Du hast dein wöchentliches Anfragekontingent für neue Filme erreicht. Bitte kontaktiere den Administrator. ist bereits auf {0}! - Etwas ging etwas schief beim hinzufügen des Filmes zu SickRage! Bitte überprüfe deine Einstellungen. + Etwas ging etwas schief beim Hinzufügen des Filmes zu SickRage! Bitte überprüfe deine Einstellungen. - Die Anfrage für Serien ist momentan nicht richtig installiert. Bitte kontaktiere den Administrator. + Das Anfragen für Serien ist momentan nicht richtig konfiguriert. Bitte kontaktiere den Administrator. - Du hast deine wöchentliche Maximalanfragen für neue Alben erreicht. Bitte kontaktiere den Administrator. + Du hast dein wöchentliches Anfragekontingent für neue Alben erreicht. Bitte kontaktiere den Administrator. Wir konnten den Interpreten auf MusicBrainz leider nicht finden. Bitte versuche es später erneut oder kontaktiere den Administrator. - Du hast deine wöchentliche Maximalanfragen für neue Serien erreicht. Bitte kontaktiere den Administrator. + Du hast dein wöchentliches Anfragekontingent für neue Serien erreicht. Bitte kontaktiere den Administrator. Entschuldige, aber dein Administrator hat diese Funktion noch nicht freigeschaltet. @@ -448,34 +448,34 @@ Französisch - Wählen Sie ihre Episode + Wähle Episode - Falscher Benutzer oder Passwort + Falscher Benutzername oder Passwort - Es gibt noch keine Informationen für diesen Release-Termin + Es gibt noch keinen Release-Termin. - Ansicht In Plex + Zeige in Plex - Spenden zur Bibliothek Maintainer + Spende zum Serveradministrator Verfügbar auf Plex - Film-Status! + Filmstatus - Noch nicht heraus! + Noch nicht angefragt Genehmigung ausstehend - Die Verarbeitung Anfrage + Anfrage wird bearbeitet. Anfrage verweigert. @@ -484,6 +484,6 @@ TV-Show-Status - Ein Hintergrundprozess gerade läuft, so könnte es einige unerwartete Verhalten sein. Dies sollte nicht zu lange dauern. + Ein Hintergrundprozess läuft gerade, der zu unerwartetem Verhalten führen könnte. Dies sollte nicht allzu lange dauern. - \ No newline at end of file + 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")