mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Check if Emby/Plex is enabled before starting the job
This commit is contained in:
parent
a206141f98
commit
4c79871bd7
5 changed files with 18 additions and 3 deletions
|
@ -81,7 +81,10 @@ namespace Ombi.Services.Jobs
|
|||
public void CheckAndUpdateAll()
|
||||
{
|
||||
var embySettings = Emby.GetSettings();
|
||||
|
||||
if (!embySettings.Enable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!ValidateSettings(embySettings))
|
||||
{
|
||||
Log.Debug("Validation of the Emby settings failed.");
|
||||
|
|
|
@ -69,7 +69,10 @@ namespace Ombi.Services.Jobs
|
|||
public void CacheContent()
|
||||
{
|
||||
var embySettings = Emby.GetSettings();
|
||||
|
||||
if (!embySettings.Enable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!ValidateSettings(embySettings))
|
||||
{
|
||||
Log.Debug("Validation of emby settings failed.");
|
||||
|
|
|
@ -82,6 +82,11 @@ namespace Ombi.Services.Jobs
|
|||
|
||||
var plexSettings = Plex.GetSettings();
|
||||
|
||||
if (!plexSettings.Enable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ValidateSettings(plexSettings))
|
||||
{
|
||||
Log.Debug("Validation of the plex settings failed.");
|
||||
|
|
|
@ -77,7 +77,10 @@ namespace Ombi.Services.Jobs
|
|||
public void CacheContent()
|
||||
{
|
||||
var plexSettings = Plex.GetSettings();
|
||||
|
||||
if (!plexSettings.Enable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!ValidateSettings(plexSettings))
|
||||
{
|
||||
Log.Debug("Validation of the plex settings failed.");
|
||||
|
|
|
@ -171,6 +171,7 @@ namespace Ombi.Services.Notification
|
|||
try
|
||||
{
|
||||
var settings = await PlexSettings.GetSettingsAsync();
|
||||
|
||||
var plexUser = PlexApi.GetUsers(settings.PlexAuthToken); // TODO emby
|
||||
var userAccount = PlexApi.GetAccount(settings.PlexAuthToken);
|
||||
var localUsers = UserHelper.GetUsers().ToList();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue