From c2da52914c3b5cabcb2cf153a4d5940e46e68387 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 8 Dec 2016 00:58:38 -0500 Subject: [PATCH] add SeriesStudioInfo object --- Emby.Server.Implementations/Dto/DtoService.cs | 21 +++++++++++++++++++ .../Library/LibraryManager.cs | 4 ++-- .../LiveTv/EmbyTV/EmbyTV.cs | 12 ++++++++++- .../Playback/BaseStreamingService.cs | 2 +- MediaBrowser.Model/Dto/BaseItemDto.cs | 2 ++ 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 438fc55d77..2b2c3e000d 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -1351,6 +1351,27 @@ namespace Emby.Server.Implementations.Dto if (episodeSeries != null) { dto.SeriesStudio = episodeSeries.Studios.FirstOrDefault(); + if (!string.IsNullOrWhiteSpace(dto.SeriesStudio)) + { + try + { + var studio = _libraryManager.GetStudio(dto.SeriesStudio); + + if (studio != null) + { + dto.SeriesStudioInfo = new StudioDto + { + Name = dto.SeriesStudio, + Id = studio.Id.ToString("N"), + PrimaryImageTag = GetImageCacheTag(studio, ImageType.Primary) + }; + } + } + catch (Exception ex) + { + + } + } } } } diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index d96756ce1b..3db8c7213c 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -341,13 +341,13 @@ namespace Emby.Server.Implementations.Library } if (item is IItemByName) { - if (!(item is MusicArtist)) + if (!(item is MusicArtist) && !(item is Studio)) { return; } } - if (item.IsFolder) + else if (item.IsFolder) { //if (!(item is ICollectionFolder) && !(item is UserView) && !(item is Channel) && !(item is AggregateFolder)) //{ diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 4e5b8d34f0..4e2b3f661f 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -1594,7 +1594,17 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV private void Process_Exited(object sender, EventArgs e) { - ((IProcess)sender).Dispose(); + var process = (IProcess)sender; + try + { + _logger.Info("Recording post-processing script completed with exit code {0}", process.ExitCode); + } + catch + { + + } + + process.Dispose(); } private async Task SaveRecordingImage(string recordingPath, LiveTvProgram program, ItemImageInfo image) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 3718edba49..58d193814a 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -396,7 +396,7 @@ namespace MediaBrowser.Api.Playback param += " -crf 23"; } - param += " -tune zerolatency"; + //param += " -tune zerolatency"; } else if (string.Equals(videoEncoder, "libx265", StringComparison.OrdinalIgnoreCase)) diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 8a3396e272..864123bb91 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -729,6 +729,8 @@ namespace MediaBrowser.Model.Dto /// The series studio. public string SeriesStudio { get; set; } + public StudioDto SeriesStudioInfo { get; set; } + /// /// Gets or sets the parent thumb item id. ///