Merge pull request #1267 from tidusjar/dev

Dev
pull/1300/head
Jamie 7 years ago committed by GitHub
commit ec103c0eb6

@ -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<RadarrMovieResponse> GetMovies(string apiKey, Uri baseUrl);
List<SonarrProfile> GetProfiles(string apiKey, Uri baseUrl);
SystemStatus SystemStatus(string apiKey, Uri baseUrl);
List<SonarrRootFolder> GetRootFolders(string apiKey, Uri baseUrl);

@ -29,6 +29,9 @@ using System.Collections.Generic;
namespace Ombi.Api.Models.Radarr
{
/// <summary>
/// This is not used now... Keeping it here incase Radarr changes their mind again.
/// </summary>
public class RadarrMovieContainer
{
public int page { get; set; }

@ -152,7 +152,7 @@ namespace Ombi.Api
}
public RadarrMovieContainer GetMovies(string apiKey, Uri baseUrl)
public List<RadarrMovieResponse> 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<RadarrMovieContainer>(obj.Content);
return JsonConvert.DeserializeObject<List<RadarrMovieResponse>>(obj.Content);
}
}
}

@ -53,9 +53,9 @@ namespace Ombi.Core.Migration.Migrations
}
public int Version => 22000;
private ISettingsService<CustomizationSettings> Customization { get; }
private ISettingsService<CustomizationSettings> Customization { get; }
private ISettingsService<PlexSettings> PlexSettings { get; }
private IRepository<RecentlyAddedLog> Log { get; }
private IRepository<RecentlyAddedLog> Log { get; }
private IRepository<PlexContent> PlexContent { get; }
private IRepository<PlexEpisodes> 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);
}
}
}

@ -55,6 +55,6 @@ namespace Ombi.Core.SettingModels
public bool NewSearch { get; set; }
public bool EnableIssues { get; set; }
public bool EnableNetflixResults { get; set; }
}
}

@ -67,7 +67,7 @@ namespace Ombi.Services.Jobs
if (movies != null)
{
var movieIds = new List<int>();
foreach (var m in movies.records)
foreach (var m in movies)
{
if (m.tmdbId > 0)
{

@ -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<EmbyRecentlyAddedModel>();
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);
}
}

@ -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> plexSettings,
ISettingsService<EmailNotificationSettings> email,

@ -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!");

@ -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) {

@ -124,7 +124,7 @@
<value>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!</value>
</data>
<data name="UserLogin_Paragraph_SpanHover" xml:space="preserve">
<value>Ihre Login-Daten werden nur zur Authorisierung Ihres Plex-Konto verwendet.</value>
<value>Deine Login-Daten werden nur zur Authorisierung deines Plex-Konto verwendet.</value>
</data>
<data name="UserLogin_Username" xml:space="preserve">
<value>Benutzername</value>
@ -172,7 +172,7 @@
<value>Ausloggen</value>
</data>
<data name="Layout_UpdateAvailablePart1" xml:space="preserve">
<value>Es ist ein neues Update verfügbar! Hier Klicken</value>
<value>Es ist ein neues Update verfügbar! Klicke</value>
</data>
<data name="Layout_English" xml:space="preserve">
<value>Englisch</value>
@ -211,7 +211,7 @@
<value>Alben</value>
</data>
<data name="Search_Paragraph" xml:space="preserve">
<value>Möchten Sie etwas schauen, das derzeit nicht auf {0} ist?! Kein Problem! Suchen Sie unten einfach danach und fragen Sie es an!</value>
<value>Möchtest Du etwas schauen, das derzeit nicht auf {0} ist?! Kein Problem! Suche einfach unten danach und frage es an!</value>
</data>
<data name="Search_Title" xml:space="preserve">
<value>Suche</value>
@ -226,7 +226,7 @@
<value>Momentan im Kino</value>
</data>
<data name="Search_SendNotificationText" xml:space="preserve">
<value>Sende mir eine Benachrichtigung, wenn die Serien oder die Filme, die ich angefordert habe hinzugefügt wurden.</value>
<value>Sende mir eine Benachrichtigung, wenn die Serien oder die Filme, die ich angefordert habe, hinzugefügt wurden.</value>
</data>
<data name="Common_Save" xml:space="preserve">
<value>Speichern</value>
@ -283,7 +283,7 @@
<value>Schliessen</value>
</data>
<data name="Issues_Modal_Title" xml:space="preserve">
<value>Fügen Sie ein Problem hinzu</value>
<value>Fügen ein Problem hinzu</value>
</data>
<data name="Issues_Modal_Save" xml:space="preserve">
<value>Änderungen speichern</value>
@ -298,7 +298,7 @@
<value>Anfragen</value>
</data>
<data name="Requests_Paragraph" xml:space="preserve">
<value>Unten befinden sich alle Anfragen aller Benutzer. Hier ist auch der aktuelle Status des beantragten Mediums ersichtlich.</value>
<value>Unten befinden sich alle Anfragen aller Benutzer. Hier ist auch der aktuelle Status des beantragten Titels ersichtlich.</value>
</data>
<data name="Requests_MoviesTabTitle" xml:space="preserve">
<value>Filme</value>
@ -400,40 +400,40 @@
<value>Verfügbar</value>
</data>
<data name="Issues_Issue" xml:space="preserve">
<value>Problemstellung</value>
<value>Problem</value>
</data>
<data name="Search_SuccessfullyAdded" xml:space="preserve">
<value>wurde erfolgreich hinzugefügt!</value>
</data>
<data name="Search_AlreadyRequested" xml:space="preserve">
<value>wurde bereits angefragt!</value>
<value>wurde schon angefragt</value>
</data>
<data name="Search_CouldNotCheckPlex" xml:space="preserve">
<value>Wir konnten nicht prüfen ob {0} bereits auf {1}ist. Bist du sicher dass alles richtig installiert ist?</value>
</data>
<data name="Search_CouchPotatoError" xml:space="preserve">
<value>Etwas ging etwas schief beim hinzufügen des Filmes zu CouchPotato! Bitte überprüfe deine Einstellungen.</value>
<value>Etwas ging etwas schief beim Hinzufügen des Filmes zu CouchPotato! Bitte überprüfe deine Einstellungen.</value>
</data>
<data name="Search_WeeklyRequestLimitMovie" xml:space="preserve">
<value>Du hast deine wöchentliche Maximalanfragen für neue Filme erreicht. Bitte kontaktiere den Administrator.</value>
<value>Du hast dein wöchentliches Anfragekontingent für neue Filme erreicht. Bitte kontaktiere den Administrator.</value>
</data>
<data name="Search_AlreadyInPlex" xml:space="preserve">
<value>ist bereits auf {0}!</value>
</data>
<data name="Search_SickrageError" xml:space="preserve">
<value>Etwas ging etwas schief beim hinzufügen des Filmes zu SickRage! Bitte überprüfe deine Einstellungen.</value>
<value>Etwas ging etwas schief beim Hinzufügen des Filmes zu SickRage! Bitte überprüfe deine Einstellungen.</value>
</data>
<data name="Search_TvNotSetUp" xml:space="preserve">
<value>Die Anfrage für Serien ist momentan nicht richtig installiert. Bitte kontaktiere den Administrator.</value>
<value>Das Anfragen für Serien ist momentan nicht richtig konfiguriert. Bitte kontaktiere den Administrator.</value>
</data>
<data name="Search_WeeklyRequestLimitAlbums" xml:space="preserve">
<value>Du hast deine wöchentliche Maximalanfragen für neue Alben erreicht. Bitte kontaktiere den Administrator.</value>
<value>Du hast dein wöchentliches Anfragekontingent für neue Alben erreicht. Bitte kontaktiere den Administrator.</value>
</data>
<data name="Search_MusicBrainzError" xml:space="preserve">
<value>Wir konnten den Interpreten auf MusicBrainz leider nicht finden. Bitte versuche es später erneut oder kontaktiere den Administrator.</value>
</data>
<data name="Search_WeeklyRequestLimitTVShow" xml:space="preserve">
<value>Du hast deine wöchentliche Maximalanfragen für neue Serien erreicht. Bitte kontaktiere den Administrator.</value>
<value>Du hast dein wöchentliches Anfragekontingent für neue Serien erreicht. Bitte kontaktiere den Administrator.</value>
</data>
<data name="Search_ErrorNotEnabled" xml:space="preserve">
<value>Entschuldige, aber dein Administrator hat diese Funktion noch nicht freigeschaltet.</value>
@ -448,34 +448,34 @@
<value>Französisch</value>
</data>
<data name="Search_SelectEpisode" xml:space="preserve">
<value>Wählen Sie ihre Episode</value>
<value>Wähle Episode</value>
</data>
<data name="UserLogin_IncorrectUserPass" xml:space="preserve">
<value>Falscher Benutzer oder Passwort</value>
<value>Falscher Benutzername oder Passwort</value>
</data>
<data name="Requests_ReleaseDate_Unavailable" xml:space="preserve">
<value>Es gibt noch keine Informationen für diesen Release-Termin</value>
<value>Es gibt noch keinen Release-Termin.</value>
</data>
<data name="Search_ViewInPlex" xml:space="preserve">
<value>Ansicht In Plex</value>
<value>Zeige in Plex</value>
</data>
<data name="Custom_Donation_Default" xml:space="preserve">
<value>Spenden zur Bibliothek Maintainer</value>
<value>Spende zum Serveradministrator</value>
</data>
<data name="Search_Available_on_plex" xml:space="preserve">
<value>Verfügbar auf Plex</value>
</data>
<data name="Search_Movie_Status" xml:space="preserve">
<value>Film-Status!</value>
<value>Filmstatus</value>
</data>
<data name="Search_Not_Requested_Yet" xml:space="preserve">
<value>Noch nicht heraus!</value>
<value>Noch nicht angefragt</value>
</data>
<data name="Search_Pending_approval" xml:space="preserve">
<value>Genehmigung ausstehend</value>
</data>
<data name="Search_Processing_Request" xml:space="preserve">
<value>Die Verarbeitung Anfrage</value>
<value>Anfrage wird bearbeitet.</value>
</data>
<data name="Search_Request_denied" xml:space="preserve">
<value>Anfrage verweigert.</value>
@ -484,6 +484,6 @@
<value>TV-Show-Status</value>
</data>
<data name="Layout_CacherRunning" xml:space="preserve">
<value>Ein Hintergrundprozess gerade läuft, so könnte es einige unerwartete Verhalten sein. Dies sollte nicht zu lange dauern.</value>
<value>Ein Hintergrundprozess läuft gerade, der zu unerwartetem Verhalten führen könnte. Dies sollte nicht allzu lange dauern.</value>
</data>
</root>
</root>

@ -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")
<div class="form-group">
<div>
<button type="submit" id="save" class="btn btn-primary-outline">Submit</button>

@ -14,6 +14,7 @@
<div>
<div hidden="hidden" id="useNewSearch">@Model.CustomizationSettings.NewSearch</div>
<div hidden="hidden" id="enableNetflix">@Model.CustomizationSettings.EnableNetflixResults</div>
<h1 id="searchTitle">@UI.Search_Title</h1>
<h4>@string.Format(UI.Search_Paragraph, Model.Emby ? "Emby" : "Plex")</h4>
<br />

Loading…
Cancel
Save