This commit is contained in:
tidusjar 2017-11-23 15:32:49 +00:00
commit a383839bd0
23 changed files with 917 additions and 30 deletions

View file

@ -36,6 +36,7 @@ using Ombi.Api.Plex;
using Ombi.Api.Plex.Models;
using Ombi.Core.Settings;
using Ombi.Core.Settings.Models.External;
using Ombi.Helpers;
using Ombi.Store.Entities;
namespace Ombi.Core.Authentication
@ -102,6 +103,15 @@ namespace Ombi.Core.Authentication
/// <returns></returns>
private async Task<bool> CheckEmbyPasswordAsync(OmbiUser user, string password)
{
if (user.IsEmbyConnect)
{
var result = await _embyApi.LoginConnectUser(user.UserName, password);
if (result.AccessToken.HasValue())
{
return true;
}
}
var embySettings = await _embySettings.GetSettingsAsync();
foreach (var server in embySettings.Servers)
{