Reworked the newsletter for Emby! Need to rework it for Plex and use the new way to do it.

Fixed collections for Emby #435
This commit is contained in:
tidusjar 2017-02-03 20:26:28 +00:00
commit 8393a31a48
17 changed files with 631 additions and 134 deletions

View file

@ -35,6 +35,7 @@ using Ombi.Core;
using Ombi.Core.SettingModels;
using Ombi.Services.Interfaces;
using Ombi.Services.Jobs;
using Ombi.Services.Jobs.RecentlyAddedNewsletter;
using Ombi.UI.Helpers;
using Quartz;
using Quartz.Impl;
@ -70,7 +71,7 @@ namespace Ombi.UI.Jobs
JobBuilder.Create<StoreBackup>().WithIdentity("StoreBackup", "Database").Build(),
JobBuilder.Create<StoreCleanup>().WithIdentity("StoreCleanup", "Database").Build(),
JobBuilder.Create<UserRequestLimitResetter>().WithIdentity("UserRequestLimiter", "Request").Build(),
JobBuilder.Create<RecentlyAdded>().WithIdentity("RecentlyAddedModel", "Email").Build(),
JobBuilder.Create<RecentlyAddedNewsletter>().WithIdentity("RecentlyAddedModel", "Email").Build(),
JobBuilder.Create<FaultQueueHandler>().WithIdentity("FaultQueueHandler", "Fault").Build(),
JobBuilder.Create<RadarrCacher>().WithIdentity("RadarrCacher", "Cache").Build(),

View file

@ -42,6 +42,7 @@ using Nancy.Validation;
using NLog;
using Ombi.Api;
using Ombi.Api.Interfaces;
using Ombi.Api.Models.Movie;
using Ombi.Core;
using Ombi.Core.Models;
using Ombi.Core.SettingModels;
@ -823,6 +824,10 @@ namespace Ombi.UI.Modules.Admin
{
return Response.AsJson(valid.SendJsonError());
}
if (!settings.Enabled)
{
return Response.AsJson(new CouchPotatoProfiles{list = new List<ProfileList>()});
}
var profiles = CpApi.GetProfiles(settings.FullUri, settings.ApiKey);
// set the cache

View file

@ -32,6 +32,7 @@ using Ombi.Helpers.Analytics;
using Ombi.Services.Interfaces;
using Ombi.Services.Jobs;
using Ombi.Services.Jobs.Interfaces;
using Ombi.Services.Jobs.RecentlyAddedNewsletter;
using Ombi.UI.Jobs;
using Quartz;
using Quartz.Impl;
@ -48,8 +49,8 @@ namespace Ombi.UI.NinjectModules
Bind<IWatcherCacher>().To<WatcherCacher>();
Bind<ISonarrCacher>().To<SonarrCacher>();
Bind<ISickRageCacher>().To<SickRageCacher>();
Bind<IRecentlyAdded>().To<RecentlyAdded>();
Bind<IMassEmail>().To<RecentlyAdded>();
Bind<IRecentlyAdded>().To<RecentlyAddedNewsletter>();
Bind<IMassEmail>().To<RecentlyAddedNewsletter>();
Bind<IRadarrCacher>().To<RadarrCacher>();
Bind<IPlexContentCacher>().To<PlexContentCacher>();
Bind<IJobFactory>().To<CustomJobFactory>();
@ -65,6 +66,7 @@ namespace Ombi.UI.NinjectModules
Bind<IEmbyContentCacher>().To<EmbyContentCacher>();
Bind<IEmbyEpisodeCacher>().To<EmbyEpisodeCacher>();
Bind<IEmbyUserChecker>().To<EmbyUserChecker>();
Bind<IEmbyAddedNewsletter>().To<EmbyAddedNewsletter>();
Bind<IAnalytics>().To<Analytics>();