mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -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()
|
public void CheckAndUpdateAll()
|
||||||
{
|
{
|
||||||
var embySettings = Emby.GetSettings();
|
var embySettings = Emby.GetSettings();
|
||||||
|
if (!embySettings.Enable)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!ValidateSettings(embySettings))
|
if (!ValidateSettings(embySettings))
|
||||||
{
|
{
|
||||||
Log.Debug("Validation of the Emby settings failed.");
|
Log.Debug("Validation of the Emby settings failed.");
|
||||||
|
|
|
@ -69,7 +69,10 @@ namespace Ombi.Services.Jobs
|
||||||
public void CacheContent()
|
public void CacheContent()
|
||||||
{
|
{
|
||||||
var embySettings = Emby.GetSettings();
|
var embySettings = Emby.GetSettings();
|
||||||
|
if (!embySettings.Enable)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!ValidateSettings(embySettings))
|
if (!ValidateSettings(embySettings))
|
||||||
{
|
{
|
||||||
Log.Debug("Validation of emby settings failed.");
|
Log.Debug("Validation of emby settings failed.");
|
||||||
|
|
|
@ -82,6 +82,11 @@ namespace Ombi.Services.Jobs
|
||||||
|
|
||||||
var plexSettings = Plex.GetSettings();
|
var plexSettings = Plex.GetSettings();
|
||||||
|
|
||||||
|
if (!plexSettings.Enable)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ValidateSettings(plexSettings))
|
if (!ValidateSettings(plexSettings))
|
||||||
{
|
{
|
||||||
Log.Debug("Validation of the plex settings failed.");
|
Log.Debug("Validation of the plex settings failed.");
|
||||||
|
|
|
@ -77,7 +77,10 @@ namespace Ombi.Services.Jobs
|
||||||
public void CacheContent()
|
public void CacheContent()
|
||||||
{
|
{
|
||||||
var plexSettings = Plex.GetSettings();
|
var plexSettings = Plex.GetSettings();
|
||||||
|
if (!plexSettings.Enable)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!ValidateSettings(plexSettings))
|
if (!ValidateSettings(plexSettings))
|
||||||
{
|
{
|
||||||
Log.Debug("Validation of the plex settings failed.");
|
Log.Debug("Validation of the plex settings failed.");
|
||||||
|
|
|
@ -171,6 +171,7 @@ namespace Ombi.Services.Notification
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var settings = await PlexSettings.GetSettingsAsync();
|
var settings = await PlexSettings.GetSettingsAsync();
|
||||||
|
|
||||||
var plexUser = PlexApi.GetUsers(settings.PlexAuthToken); // TODO emby
|
var plexUser = PlexApi.GetUsers(settings.PlexAuthToken); // TODO emby
|
||||||
var userAccount = PlexApi.GetAccount(settings.PlexAuthToken);
|
var userAccount = PlexApi.GetAccount(settings.PlexAuthToken);
|
||||||
var localUsers = UserHelper.GetUsers().ToList();
|
var localUsers = UserHelper.GetUsers().ToList();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue