From a7b0b601fa7a783e6b8dfbbc8c74485f53a58259 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 2 Oct 2017 16:18:27 -0400 Subject: [PATCH] 3.2.33.1 --- .../FFMpeg/FFMpegLoader.cs | 14 ++++++---- .../TV/TVSeriesManager.cs | 28 ++++++++++++++----- SharedVersion.cs | 2 +- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs index e266ea21b..9f4cd05fa 100644 --- a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs @@ -49,18 +49,20 @@ namespace Emby.Server.Implementations.FFMpeg var downloadInfo = _ffmpegInstallInfo; - var version = downloadInfo.Version; - - if (string.Equals(version, "path", StringComparison.OrdinalIgnoreCase)) + var prebuiltffmpeg = Path.Combine(_appPaths.ProgramSystemPath, downloadInfo.FFMpegFilename); + var prebuiltffprobe = Path.Combine(_appPaths.ProgramSystemPath, downloadInfo.FFProbeFilename); + if (_fileSystem.FileExists(prebuiltffmpeg) && _fileSystem.FileExists(prebuiltffprobe)) { return new FFMpegInfo { - ProbePath = downloadInfo.FFProbeFilename, - EncoderPath = downloadInfo.FFMpegFilename, - Version = version + ProbePath = prebuiltffprobe, + EncoderPath = prebuiltffmpeg, + Version = "external" }; } + var version = downloadInfo.Version; + if (string.Equals(version, "0", StringComparison.OrdinalIgnoreCase)) { return new FFMpegInfo(); diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index ec2d8c4fc..d92245a67 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -36,8 +36,6 @@ namespace Emby.Server.Implementations.TV throw new ArgumentException("User not found"); } - var parentIdGuid = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId); - string presentationUniqueKey = null; int? limit = null; if (!string.IsNullOrWhiteSpace(request.SeriesId)) @@ -56,10 +54,26 @@ namespace Emby.Server.Implementations.TV return GetResult(GetNextUpEpisodes(request, user, new[] { presentationUniqueKey }, dtoOptions), request); } - var parents = user.RootFolder.GetChildren(user, true) - .Where(i => i is Folder) - .Where(i => !user.Configuration.LatestItemsExcludes.Contains(i.Id.ToString("N"))) - .ToList(); + var parentIdGuid = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId); + + List parents; + + if (parentIdGuid.HasValue) + { + var parent = _libraryManager.GetItemById(parentIdGuid.Value); + parents = new List(); + if (parent != null) + { + parents.Add(parent); + } + } + else + { + parents = user.RootFolder.GetChildren(user, true) + .Where(i => i is Folder) + .Where(i => !user.Configuration.LatestItemsExcludes.Contains(i.Id.ToString("N"))) + .ToList(); + } return GetNextUp(request, parents, dtoOptions); } @@ -88,7 +102,7 @@ namespace Emby.Server.Implementations.TV if (!string.IsNullOrWhiteSpace(presentationUniqueKey)) { - return GetResult(GetNextUpEpisodes(request, user, new [] { presentationUniqueKey }, dtoOptions), request); + return GetResult(GetNextUpEpisodes(request, user, new[] { presentationUniqueKey }, dtoOptions), request); } if (limit.HasValue) diff --git a/SharedVersion.cs b/SharedVersion.cs index ff7ab5136..75e244625 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.33.0")] +[assembly: AssemblyVersion("3.2.33.1")]