mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Added a new setting for the Netflix option, we can now disable it appearing in the search.
Stopped the Emby newsletter sending out all TV shows every time.
This commit is contained in:
parent
9ca3ee4058
commit
2b27559277
7 changed files with 16 additions and 8 deletions
|
@ -68,6 +68,7 @@ namespace Ombi.Core.Migration.Migrations
|
|||
AddNewColumns(con);
|
||||
UpdateSchema(con, Version);
|
||||
UpdateRecentlyAdded(con);
|
||||
|
||||
}
|
||||
|
||||
private void UpdateRecentlyAdded(IDbConnection con)
|
||||
|
@ -125,9 +126,8 @@ namespace Ombi.Core.Migration.Migrations
|
|||
|
||||
var settings = Customization.GetSettings();
|
||||
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; }
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
4
Ombi.UI/Content/search.js
vendored
4
Ombi.UI/Content/search.js
vendored
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue