From fd71890247ca34bbc2803ead6c75930d36379a13 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 6 Apr 2017 16:07:07 -0400 Subject: [PATCH 1/2] update segment handler --- MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index bd4442a59..3ead4626a 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -443,7 +443,7 @@ namespace MediaBrowser.Api.Playback.Hls var currentTranscodingIndex = GetCurrentTranscodingIndex(playlistPath, segmentExtension); // If requested segment is less than transcoding position, we can't transcode backwards, so assume it's ready - if (segmentIndex < currentTranscodingIndex) + if (segmentIndex != currentTranscodingIndex) { return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false); } From ccb694a89ad5ba63fcae1c9634a55c1f0378d98c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 6 Apr 2017 16:07:25 -0400 Subject: [PATCH 2/2] update home sections --- Emby.Server.Implementations/Library/UserManager.cs | 6 +++--- .../LiveTv/TunerHosts/BaseTunerHost.cs | 5 ----- Emby.Server.Implementations/Session/SessionManager.cs | 4 +++- MediaBrowser.Api/UserService.cs | 2 +- MediaBrowser.Controller/Library/IUserManager.cs | 4 ++-- SharedVersion.cs | 2 +- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 3b11a4767..89b7198ca 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -182,7 +182,7 @@ namespace Emby.Server.Implementations.Library } } - public Task AuthenticateUser(string username, string passwordSha1, string remoteEndPoint) + public Task AuthenticateUser(string username, string passwordSha1, string remoteEndPoint) { return AuthenticateUser(username, passwordSha1, null, remoteEndPoint); } @@ -226,7 +226,7 @@ namespace Emby.Server.Implementations.Library return builder.ToString(); } - public async Task AuthenticateUser(string username, string passwordSha1, string passwordMd5, string remoteEndPoint) + public async Task AuthenticateUser(string username, string passwordSha1, string passwordMd5, string remoteEndPoint) { if (string.IsNullOrWhiteSpace(username)) { @@ -307,7 +307,7 @@ namespace Emby.Server.Implementations.Library _logger.Info("Authentication request for {0} {1}.", user.Name, success ? "has succeeded" : "has been denied"); - return success; + return success ? user : null; } private async Task UpdateInvalidLoginAttemptCount(User user, int newValue) diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs index 74b8a7764..10b7132a1 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs @@ -227,11 +227,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts throw new LiveTvConflictException(); } - protected virtual bool EnableMediaProbing - { - get { return false; } - } - protected async Task IsAvailable(TunerHostInfo tuner, string channelId, CancellationToken cancellationToken) { try diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 8051b7848..05a240cea 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1404,12 +1404,14 @@ namespace Emby.Server.Implementations.Session { var result = await _userManager.AuthenticateUser(request.Username, request.PasswordSha1, request.PasswordMd5, request.RemoteEndPoint).ConfigureAwait(false); - if (!result) + if (result == null) { EventHelper.FireEventIfNotNull(AuthenticationFailed, this, new GenericEventArgs(request), _logger); throw new SecurityException("Invalid user or password entered."); } + + user = result; } var token = await GetAuthorizationToken(user.Id.ToString("N"), request.DeviceId, request.App, request.AppVersion, request.DeviceName).ConfigureAwait(false); diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index 96c7fc111..bbae918a1 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -461,7 +461,7 @@ namespace MediaBrowser.Api { var success = await _userManager.AuthenticateUser(user.Name, request.CurrentPassword, Request.RemoteIp).ConfigureAwait(false); - if (!success) + if (success != null) { throw new ArgumentException("Invalid user or password entered."); } diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index a167cdbed..ef68d2560 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -66,7 +66,7 @@ namespace MediaBrowser.Controller.Library /// The remote end point. /// Task{System.Boolean}. /// user - Task AuthenticateUser(string username, string passwordSha1, string remoteEndPoint); + Task AuthenticateUser(string username, string passwordSha1, string remoteEndPoint); /// /// Refreshes metadata for each user @@ -164,7 +164,7 @@ namespace MediaBrowser.Controller.Library /// The password MD5. /// The remote end point. /// Task<System.Boolean>. - Task AuthenticateUser(string username, string passwordSha1, string passwordMd5, string remoteEndPoint); + Task AuthenticateUser(string username, string passwordSha1, string passwordMd5, string remoteEndPoint); /// /// Starts the forgot password process. diff --git a/SharedVersion.cs b/SharedVersion.cs index 505644808..891f858e0 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.10.6")] +[assembly: AssemblyVersion("3.2.10.7")]