From e1f953d5177f3d3dcfff9822a155793b0b1e0f65 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 12 Oct 2016 15:50:30 -0400 Subject: [PATCH 1/6] update mac project --- MediaBrowser.Server.Mac/Emby.Server.Mac.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj index 36fda1e702..cb3551ca51 100644 --- a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj +++ b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj @@ -35,7 +35,7 @@ false false HttpClientHandler - Legacy + Default None true From cc6b8f44d1edc3143ac7f58b448c5075812bf904 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 12 Oct 2016 17:01:35 -0400 Subject: [PATCH 2/6] update RecordingStatus --- MediaBrowser.Model/LiveTv/RecordingStatus.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/MediaBrowser.Model/LiveTv/RecordingStatus.cs b/MediaBrowser.Model/LiveTv/RecordingStatus.cs index 571ff9c998..496e6f421f 100644 --- a/MediaBrowser.Model/LiveTv/RecordingStatus.cs +++ b/MediaBrowser.Model/LiveTv/RecordingStatus.cs @@ -4,7 +4,6 @@ namespace MediaBrowser.Model.LiveTv public enum RecordingStatus { New, - Scheduled, InProgress, Completed, Cancelled, From 2095170eeda806c3fa6195d735ec0734d05b70a1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 13 Oct 2016 11:07:21 -0400 Subject: [PATCH 3/6] update live tv screens --- .../HttpServer/HttpListenerHost.cs | 2 +- MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 1 + .../LiveTv/TunerHosts/M3uParser.cs | 2 +- MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 9ec6719087..b3d3ec13cc 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -100,7 +100,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer container.Adapter = _containerAdapter; Plugins.RemoveAll(x => x is NativeTypesFeature); - //Plugins.Add(new SwaggerFeature()); + Plugins.Add(new SwaggerFeature()); Plugins.Add(new CorsFeature(allowedHeaders: "Content-Type, Authorization, Range, X-MediaBrowser-Token, X-Emby-Authorization")); //Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 136a9e195c..86d77982ce 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -761,6 +761,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { defaults.SeriesId = program.SeriesId; defaults.ProgramId = program.Id; + defaults.RecordNewOnly = !program.IsRepeat; } defaults.SkipEpisodesInLibrary = true; diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index 8095a6989b..c07c448db9 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -112,8 +112,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts } channel.ImageUrl = FindProperty("tvg-logo", extInf, null); - channel.Number = FindProperty("tvg-id", extInf, channel.Number); channel.Number = FindProperty("channel-id", extInf, channel.Number); + channel.Number = FindProperty("tvg-id", extInf, channel.Number); channel.Name = FindProperty("tvg-name", extInf, channel.Name); channel.Name = FindProperty("tvg-id", extInf, channel.Name); return channel; diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 0553f85813..e2ff0ef41d 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -1306,7 +1306,7 @@ namespace MediaBrowser.Server.Startup.Common EncoderLocationType = MediaEncoder.EncoderLocationType, SystemArchitecture = NativeApp.Environment.SystemArchitecture, SystemUpdateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel, - PackageName = _startupOptions.GetOption("package") + PackageName = _startupOptions.GetOption("-package") }; } From b9c430059a3097387ea925a3f5588c3042bb2464 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 13 Oct 2016 14:43:47 -0400 Subject: [PATCH 4/6] fix playlist deletion --- MediaBrowser.Api/ItemUpdateService.cs | 2 +- MediaBrowser.Controller/Entities/Folder.cs | 2 +- .../Library/Resolvers/TV/SeriesResolver.cs | 27 ++++++++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index 687a21a468..16e8a434a1 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -81,7 +81,7 @@ namespace MediaBrowser.Api info.ContentTypeOptions = GetContentTypeOptions(true); info.ContentType = configuredContentType; - if (string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) + if (string.IsNullOrWhiteSpace(inheritedContentType) || string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) { info.ContentTypeOptions = info.ContentTypeOptions .Where(i => string.IsNullOrWhiteSpace(i.Value) || string.Equals(i.Value, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 1e466ec089..cc71ab43e3 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1068,7 +1068,7 @@ namespace MediaBrowser.Controller.Entities { var result = new Dictionary(); - AddChildrenToList(result, true, true, filter); + AddChildrenToList(result, includeLinkedChildren, true, filter); return result.Values.ToList(); } diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index c828250074..870e8b55ac 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -59,18 +59,18 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV return null; } - if (args.ContainsFileSystemEntryByName("tvshow.nfo")) - { - return new Series - { - Path = args.Path, - Name = Path.GetFileName(args.Path) - }; - } - var collectionType = args.GetCollectionType(); if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) { + if (args.ContainsFileSystemEntryByName("tvshow.nfo")) + { + return new Series + { + Path = args.Path, + Name = Path.GetFileName(args.Path) + }; + } + var configuredContentType = _libraryManager.GetConfiguredContentType(args.Path); if (!string.Equals(configuredContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) { @@ -83,6 +83,15 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV } else if (string.IsNullOrWhiteSpace(collectionType)) { + if (args.ContainsFileSystemEntryByName("tvshow.nfo")) + { + return new Series + { + Path = args.Path, + Name = Path.GetFileName(args.Path) + }; + } + if (args.Parent.IsRoot) { return null; From 91e877a88e88a979cfe3aab128261594e251220c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 13 Oct 2016 14:45:32 -0400 Subject: [PATCH 5/6] 3.1.188 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index d08764e309..013a0a5895 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.1.*")] -[assembly: AssemblyVersion("3.1.187")] +[assembly: AssemblyVersion("3.1.188")] From e206725b734f9a6226faa78ff2d0ecd2f551acc1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 13 Oct 2016 17:13:30 -0400 Subject: [PATCH 6/6] update images --- .../BaseApplicationHost.cs | 9 ++++++- .../IO/MemoryStreamProvider.cs | 27 ++++++++++++++----- .../Library/Resolvers/TV/SeriesResolver.cs | 16 +++++------ 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index 4099c9c565..e68fee829d 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -234,7 +234,14 @@ namespace MediaBrowser.Common.Implementations JsonSerializer = CreateJsonSerializer(); - MemoryStreamProvider = new MemoryStreamProvider(); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + { + MemoryStreamProvider = new RecyclableMemoryStreamProvider(); + } + else + { + MemoryStreamProvider = new MemoryStreamProvider(); + } OnLoggerLoaded(true); LogManager.LoggerLoaded += (s, e) => OnLoggerLoaded(false); diff --git a/MediaBrowser.Common.Implementations/IO/MemoryStreamProvider.cs b/MediaBrowser.Common.Implementations/IO/MemoryStreamProvider.cs index 3640552833..c429474816 100644 --- a/MediaBrowser.Common.Implementations/IO/MemoryStreamProvider.cs +++ b/MediaBrowser.Common.Implementations/IO/MemoryStreamProvider.cs @@ -1,15 +1,10 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; using MediaBrowser.Common.IO; using Microsoft.IO; namespace MediaBrowser.Common.Implementations.IO { - public class MemoryStreamProvider : IMemoryStreamProvider + public class RecyclableMemoryStreamProvider : IMemoryStreamProvider { readonly RecyclableMemoryStreamManager _manager = new RecyclableMemoryStreamManager(); @@ -28,4 +23,22 @@ namespace MediaBrowser.Common.Implementations.IO return _manager.GetStream("RecyclableMemoryStream", buffer, 0, buffer.Length); } } + + public class MemoryStreamProvider : IMemoryStreamProvider + { + public MemoryStream CreateNew() + { + return new MemoryStream(); + } + + public MemoryStream CreateNew(int capacity) + { + return new MemoryStream(capacity); + } + + public MemoryStream CreateNew(byte[] buffer) + { + return new MemoryStream(buffer); + } + } } diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 870e8b55ac..1e480e265f 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -62,14 +62,14 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV var collectionType = args.GetCollectionType(); if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) { - if (args.ContainsFileSystemEntryByName("tvshow.nfo")) - { - return new Series - { - Path = args.Path, - Name = Path.GetFileName(args.Path) - }; - } + //if (args.ContainsFileSystemEntryByName("tvshow.nfo")) + //{ + // return new Series + // { + // Path = args.Path, + // Name = Path.GetFileName(args.Path) + // }; + //} var configuredContentType = _libraryManager.GetConfiguredContentType(args.Path); if (!string.Equals(configuredContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))