Merge pull request #1061 from tidusjar/dev

Dev
This commit is contained in:
Jamie 2017-02-03 20:46:14 +00:00 committed by GitHub
commit 6eab8c09cc
26 changed files with 737 additions and 168 deletions

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
@ -1141,6 +1146,8 @@ namespace Ombi.UI.Modules.Admin
var emby = await EmbySettings.GetSettingsAsync();
var plex = await PlexService.GetSettingsAsync();
var dict = new Dictionary<string, DateTime>();
@ -1153,7 +1160,24 @@ namespace Ombi.UI.Modules.Admin
}
else
{
dict.Add(j.Name,j.LastRun);
if (j.Name.Contains("Plex"))
{
if (plex.Enable)
{
dict.Add(j.Name, j.LastRun);
}
}
else if (j.Name.Contains("Emby"))
{
if (emby.Enable)
{
dict.Add(j.Name, j.LastRun);
}
}
else
{
dict.Add(j.Name, j.LastRun);
}
}
}

View file

@ -142,7 +142,7 @@ namespace Ombi.UI.Modules.Admin
}
if (key.Equals(JobNames.RecentlyAddedEmail, StringComparison.CurrentCultureIgnoreCase))
{
RecentlyAdded.Start();
RecentlyAdded.StartNewsLetter();
}
if (key.Equals(JobNames.FaultQueueHandler, StringComparison.CurrentCultureIgnoreCase))
{