This commit is contained in:
tidusjar 2017-01-23 22:50:54 +00:00
commit 7fc26df599
19 changed files with 262 additions and 128 deletions

View file

@ -53,7 +53,7 @@ namespace Ombi.Services.Jobs
ISickRageApi srApi, ISettingsService<SonarrSettings> sonarrSettings, ISettingsService<SickRageSettings> srSettings,
ICouchPotatoApi cpApi, ISettingsService<CouchPotatoSettings> cpsettings, IRequestService requestService,
ISettingsService<HeadphonesSettings> hpSettings, IHeadphonesApi headphonesApi, ISettingsService<PlexRequestSettings> prSettings,
ISecurityExtensions security, IMovieSender movieSender)
ISecurityExtensions security, IMovieSender movieSender, ICacheProvider cache)
{
Record = record;
Repo = repo;
@ -71,6 +71,8 @@ namespace Ombi.Services.Jobs
Security = security;
PrSettings = prSettings.GetSettings();
MovieSender = movieSender;
Cache = cache;
}
private IMovieSender MovieSender { get; }
@ -78,6 +80,7 @@ namespace Ombi.Services.Jobs
private IJobRecord Record { get; }
private ISonarrApi SonarrApi { get; }
private ISickRageApi SrApi { get; }
private ICacheProvider Cache { get; }
private ICouchPotatoApi CpApi { get; }
private IHeadphonesApi HpApi { get; }
private IRequestService RequestService { get; }
@ -163,7 +166,7 @@ namespace Ombi.Services.Jobs
try
{
var sender = new TvSenderOld(SonarrApi, SrApi);
var sender = new TvSenderOld(SonarrApi, SrApi, Cache);
if (sonarr.Enabled)
{
var task = sender.SendToSonarr(sonarr, tvModel, sonarr.QualityProfile);

View file

@ -79,6 +79,7 @@ namespace Ombi.Services.Jobs
public void CheckAndUpdateAll()
{
var plexSettings = Plex.GetSettings();
if (!ValidateSettings(plexSettings))