From fd99329a00d02635c58847c94c41000b5956b790 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 27 Apr 2017 16:43:52 -0400 Subject: [PATCH 1/6] update mac project --- MediaBrowser.Server.Mac/Emby.Server.Mac.csproj | 9 +++------ MediaBrowser.Server.Mac/Main.cs | 8 ++------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj index 0cf488bd02..6b599953d2 100644 --- a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj +++ b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj @@ -2345,9 +2345,6 @@ Resources\dashboard-ui\scripts\moviesrecommended.js - - Resources\dashboard-ui\scripts\moviestudios.js - Resources\dashboard-ui\scripts\movietrailers.js @@ -2357,12 +2354,12 @@ Resources\dashboard-ui\scripts\musicartists.js - - Resources\dashboard-ui\scripts\musicfolders.js - Resources\dashboard-ui\scripts\musicgenres.js + + Resources\dashboard-ui\scripts\musicplaylists.js + Resources\dashboard-ui\scripts\musicrecommended.js diff --git a/MediaBrowser.Server.Mac/Main.cs b/MediaBrowser.Server.Mac/Main.cs index d703f7d0d3..2acbe7ce4c 100644 --- a/MediaBrowser.Server.Mac/Main.cs +++ b/MediaBrowser.Server.Mac/Main.cs @@ -32,6 +32,7 @@ using Mono.Unix.Native; using MediaBrowser.Model.System; using MediaBrowser.Model.IO; using Emby.Server.Core.Logging; +using Emby.Drawing.Net; namespace MediaBrowser.Server.Mac { @@ -111,12 +112,7 @@ namespace MediaBrowser.Server.Mac _fileSystem = fileSystem; - var imageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, - logManager, - fileSystem, - options, - () => AppHost.HttpClient, - appPaths); + var imageEncoder = new GDIImageEncoder(fileSystem, logManager.GetLogger("GDI")); AppHost = new MacAppHost(appPaths, logManager, From bf07a47132088884eb053d90a6a7a0fc7e1058c2 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 27 Apr 2017 16:47:18 -0400 Subject: [PATCH 2/6] update mac project --- MediaBrowser.Server.Mac/Emby.Server.Mac.csproj | 3 --- MediaBrowser.Server.Mac/ImageMagickSharp.dll.config | 3 --- 2 files changed, 6 deletions(-) delete mode 100644 MediaBrowser.Server.Mac/ImageMagickSharp.dll.config diff --git a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj index 6b599953d2..27ee37f5d8 100644 --- a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj +++ b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj @@ -162,9 +162,6 @@ - - PreserveNewest - diff --git a/MediaBrowser.Server.Mac/ImageMagickSharp.dll.config b/MediaBrowser.Server.Mac/ImageMagickSharp.dll.config deleted file mode 100644 index 0ad6d1e600..0000000000 --- a/MediaBrowser.Server.Mac/ImageMagickSharp.dll.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file From d9f2452350be4ad1523c517782917f598d481da4 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 27 Apr 2017 23:52:19 -0400 Subject: [PATCH 3/6] update mac son --- MediaBrowser.Server.Mac.sln | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/MediaBrowser.Server.Mac.sln b/MediaBrowser.Server.Mac.sln index 037cd488b4..bc7cba21f8 100644 --- a/MediaBrowser.Server.Mac.sln +++ b/MediaBrowser.Server.Mac.sln @@ -37,8 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DvdLib", "DvdLib\DvdLib.csp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Dlna", "Emby.Dlna\Emby.Dlna.csproj", "{805844AB-E92F-45E6-9D99-4F6D48D129A5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Drawing.ImageMagick", "Emby.Drawing.ImageMagick\Emby.Drawing.ImageMagick.csproj", "{6CFEE013-6E7C-432B-AC37-CABF0880C69A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Drawing.Net", "Emby.Drawing.Net\Emby.Drawing.Net.csproj", "{C97A239E-A96C-4D64-A844-CCF8CC30AECB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Photos", "Emby.Photos\Emby.Photos.csproj", "{89AB4548-770D-41FD-A891-8DAFF44F452C}" @@ -400,26 +398,6 @@ Global {805844AB-E92F-45E6-9D99-4F6D48D129A5}.Signed|Any CPU.Build.0 = Release|Any CPU {805844AB-E92F-45E6-9D99-4F6D48D129A5}.Signed|x86.ActiveCfg = Release|Any CPU {805844AB-E92F-45E6-9D99-4F6D48D129A5}.Signed|x86.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.AppStore|Any CPU.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.AppStore|x86.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.AppStore|x86.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Debug|x86.ActiveCfg = Debug|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Debug|x86.Build.0 = Debug|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release Mono|Any CPU.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release Mono|x86.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release Mono|x86.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release|Any CPU.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release|x86.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Release|x86.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Signed|Any CPU.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Signed|Any CPU.Build.0 = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Signed|x86.ActiveCfg = Release|Any CPU - {6CFEE013-6E7C-432B-AC37-CABF0880C69A}.Signed|x86.Build.0 = Release|Any CPU {C97A239E-A96C-4D64-A844-CCF8CC30AECB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU {C97A239E-A96C-4D64-A844-CCF8CC30AECB}.AppStore|Any CPU.Build.0 = Release|Any CPU {C97A239E-A96C-4D64-A844-CCF8CC30AECB}.AppStore|x86.ActiveCfg = Release|Any CPU From af4473e27fcc8654912f032b9b12c30a1b2c682c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 28 Apr 2017 15:17:26 -0400 Subject: [PATCH 4/6] add error handling --- .../Playback/BaseStreamingService.cs | 12 ++--- MediaBrowser.Controller/Entities/Video.cs | 51 ++++++++++--------- .../MediaEncoding/EncodingHelper.cs | 3 +- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 6935073a95..464c39d35b 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -720,12 +720,12 @@ namespace MediaBrowser.Api.Playback state.IsInputVideo = string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase); - var primaryImage = item.GetImageInfo(ImageType.Primary, 0) ?? - item.Parents.Select(i => i.GetImageInfo(ImageType.Primary, 0)).FirstOrDefault(i => i != null); - if (primaryImage != null) - { - state.AlbumCoverPath = primaryImage.Path; - } + //var primaryImage = item.GetImageInfo(ImageType.Primary, 0) ?? + // item.Parents.Select(i => i.GetImageInfo(ImageType.Primary, 0)).FirstOrDefault(i => i != null); + //if (primaryImage != null) + //{ + // state.AlbumCoverPath = primaryImage.Path; + //} MediaSourceInfo mediaSource = null; if (string.IsNullOrWhiteSpace(request.LiveStreamId)) diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 0618fc489e..5f5be16702 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -591,41 +591,46 @@ namespace MediaBrowser.Controller.Entities .ToList(); } - private static MediaSourceInfo GetVersionInfo(bool enablePathSubstitution, Video i, MediaSourceType type) + private static MediaSourceInfo GetVersionInfo(bool enablePathSubstitution, Video media, MediaSourceType type) { - var mediaStreams = MediaSourceManager.GetMediaStreams(i.Id) + if (media == null) + { + throw new ArgumentNullException("media"); + } + + var mediaStreams = MediaSourceManager.GetMediaStreams(media.Id) .ToList(); - var locationType = i.LocationType; + var locationType = media.LocationType; var info = new MediaSourceInfo { - Id = i.Id.ToString("N"), - IsoType = i.IsoType, + Id = media.Id.ToString("N"), + IsoType = media.IsoType, Protocol = locationType == LocationType.Remote ? MediaProtocol.Http : MediaProtocol.File, MediaStreams = mediaStreams, - Name = GetMediaSourceName(i, mediaStreams), - Path = enablePathSubstitution ? GetMappedPath(i, i.Path, locationType) : i.Path, - RunTimeTicks = i.RunTimeTicks, - Video3DFormat = i.Video3DFormat, - VideoType = i.VideoType, - Container = i.Container, - Size = i.Size, - Timestamp = i.Timestamp, + Name = GetMediaSourceName(media, mediaStreams), + Path = enablePathSubstitution ? GetMappedPath(media, media.Path, locationType) : media.Path, + RunTimeTicks = media.RunTimeTicks, + Video3DFormat = media.Video3DFormat, + VideoType = media.VideoType, + Container = media.Container, + Size = media.Size, + Timestamp = media.Timestamp, Type = type, - PlayableStreamFileNames = i.PlayableStreamFileNames.ToList(), - SupportsDirectStream = i.VideoType == VideoType.VideoFile, - IsRemote = i.IsShortcut + PlayableStreamFileNames = media.PlayableStreamFileNames.ToList(), + SupportsDirectStream = media.VideoType == VideoType.VideoFile, + IsRemote = media.IsShortcut }; if (info.Protocol == MediaProtocol.File) { - info.ETag = i.DateModified.Ticks.ToString(CultureInfo.InvariantCulture).GetMD5().ToString("N"); + info.ETag = media.DateModified.Ticks.ToString(CultureInfo.InvariantCulture).GetMD5().ToString("N"); } - if (i.IsShortcut) + if (media.IsShortcut) { - info.Path = i.ShortcutPath; + info.Path = media.ShortcutPath; if (info.Path.StartsWith("Http", StringComparison.OrdinalIgnoreCase)) { @@ -647,16 +652,16 @@ namespace MediaBrowser.Controller.Entities if (string.IsNullOrEmpty(info.Container)) { - if (i.VideoType == VideoType.VideoFile || i.VideoType == VideoType.Iso) + if (media.VideoType == VideoType.VideoFile || media.VideoType == VideoType.Iso) { - if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + if (!string.IsNullOrWhiteSpace(media.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) { - info.Container = System.IO.Path.GetExtension(i.Path).TrimStart('.'); + info.Container = System.IO.Path.GetExtension(media.Path).TrimStart('.'); } } } - info.Bitrate = i.TotalBitrate; + info.Bitrate = media.TotalBitrate; info.InferTotalBitrate(); return info; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 3824813f11..8821b6f1f2 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2011,12 +2011,11 @@ namespace MediaBrowser.Controller.MediaEncoding var vn = string.Empty; var hasArt = !string.IsNullOrWhiteSpace(state.AlbumCoverPath); - hasArt = false; if (hasArt) { albumCoverInput = " -i \"" + state.AlbumCoverPath + "\""; - mapArgs = " -map 0:a -map 1:v -c:v copy"; + mapArgs = " -map 0:a -map 1:v -c:1:v copy"; metadata = " -metadata:s:v title=\"Album cover\" -metadata:s:v comment=\"Cover(Front)\""; } else From f53472584eedbf21dfb43902fedda89aff57ff77 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 29 Apr 2017 02:22:33 -0400 Subject: [PATCH 5/6] update environment detection --- .../EnvironmentInfo/EnvironmentInfo.cs | 40 ++++------------ Emby.Common.Implementations/project.json | 1 + .../Channels/ChannelManager.cs | 13 +----- .../Data/SqliteItemRepository.cs | 13 ------ Emby.Server.Implementations/Dto/DtoService.cs | 5 -- .../LiveTv/EmbyTV/EmbyTV.cs | 5 -- MediaBrowser.Api/ChannelService.cs | 4 +- MediaBrowser.Api/ItemUpdateService.cs | 1 - MediaBrowser.Api/LiveTv/LiveTvService.cs | 10 ++-- MediaBrowser.Api/PlaylistService.cs | 2 +- MediaBrowser.Api/SimilarItemsHelper.cs | 2 +- MediaBrowser.Api/TvShowsService.cs | 8 ++-- .../UserLibrary/BaseItemsRequest.cs | 2 +- .../UserLibrary/UserLibraryService.cs | 2 +- .../Entities/Audio/Audio.cs | 3 -- MediaBrowser.Controller/Entities/BaseItem.cs | 12 ----- .../Entities/InternalItemsQuery.cs | 1 - MediaBrowser.Controller/Entities/Video.cs | 2 - .../Parsers/BaseItemXmlParser.cs | 12 ----- .../Savers/BaseXmlSaver.cs | 6 --- MediaBrowser.Model/Dto/BaseItemDto.cs | 6 --- MediaBrowser.Model/Querying/ItemFields.cs | 5 -- .../ImagesByName/ImageUtils.cs | 35 +++++++------- .../Manager/ProviderUtils.cs | 5 -- .../Studios/StudiosImageProvider.cs | 17 +++---- .../MediaBrowser.Server.Mono.csproj | 4 ++ MediaBrowser.Server.Mono/packages.config | 1 + .../MediaBrowser.ServerApplication.csproj | 4 ++ .../Native/LoopUtil.cs | 46 ------------------- .../packages.config | 1 + .../Parsers/BaseNfoParser.cs | 12 ----- .../Savers/BaseNfoSaver.cs | 6 --- 32 files changed, 58 insertions(+), 228 deletions(-) diff --git a/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs index ad6e35700b..a9debe8d20 100644 --- a/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs +++ b/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs @@ -22,30 +22,19 @@ namespace Emby.Common.Implementations.EnvironmentInfo return CustomOperatingSystem.Value; } -#if NET46 - switch (Environment.OSVersion.Platform) - { - case PlatformID.MacOSX: - return MediaBrowser.Model.System.OperatingSystem.OSX; - case PlatformID.Win32NT: - return MediaBrowser.Model.System.OperatingSystem.Windows; - case PlatformID.Unix: - return MediaBrowser.Model.System.OperatingSystem.Linux; - } -#elif NETSTANDARD1_6 if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { - return OperatingSystem.OSX; + return MediaBrowser.Model.System.OperatingSystem.OSX; } if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - return OperatingSystem.Windows; + return MediaBrowser.Model.System.OperatingSystem.Windows; } if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { - return OperatingSystem.Linux; + return MediaBrowser.Model.System.OperatingSystem.Linux; } -#endif + return MediaBrowser.Model.System.OperatingSystem.Windows; } } @@ -54,12 +43,7 @@ namespace Emby.Common.Implementations.EnvironmentInfo { get { -#if NET46 - return Environment.OSVersion.Platform.ToString(); -#elif NETSTANDARD1_6 - return System.Runtime.InteropServices.RuntimeInformation.OSDescription; -#endif - return "Operating System"; + return System.Runtime.InteropServices.RuntimeInformation.OSDescription; } } @@ -67,12 +51,7 @@ namespace Emby.Common.Implementations.EnvironmentInfo { get { -#if NET46 - return Environment.OSVersion.Version.ToString() + " " + Environment.OSVersion.ServicePack.ToString(); -#elif NETSTANDARD1_6 - return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; -#endif - return "1.0"; + return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; } } @@ -92,10 +71,8 @@ namespace Emby.Common.Implementations.EnvironmentInfo { return CustomArchitecture.Value; } -#if NET46 - return Environment.Is64BitOperatingSystem ? MediaBrowser.Model.System.Architecture.X64 : MediaBrowser.Model.System.Architecture.X86; -#elif NETSTANDARD1_6 - switch(System.Runtime.InteropServices.RuntimeInformation.OSArchitecture) + + switch (System.Runtime.InteropServices.RuntimeInformation.OSArchitecture) { case System.Runtime.InteropServices.Architecture.Arm: return MediaBrowser.Model.System.Architecture.Arm; @@ -106,7 +83,6 @@ namespace Emby.Common.Implementations.EnvironmentInfo case System.Runtime.InteropServices.Architecture.X86: return MediaBrowser.Model.System.Architecture.X86; } -#endif return MediaBrowser.Model.System.Architecture.X64; } } diff --git a/Emby.Common.Implementations/project.json b/Emby.Common.Implementations/project.json index 674101e8a7..dcd4085b94 100644 --- a/Emby.Common.Implementations/project.json +++ b/Emby.Common.Implementations/project.json @@ -23,6 +23,7 @@ "System.Xml.ReaderWriter": "4.0.0" }, "dependencies": { + "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", "SimpleInjector": "3.2.4", "ServiceStack.Text": "4.5.4", "NLog": "4.4.0-betaV15", diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 8f03fa7a47..9ac6459a12 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -275,17 +275,7 @@ namespace Emby.Server.Implementations.Channels public async Task> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken) { - IEnumerable results = new List(); - var video = item as Video; - if (video != null) - { - results = video.ChannelMediaSources; - } - var audio = item as Audio; - if (audio != null) - { - results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio); - } + IEnumerable results = GetSavedMediaSources(item); return SortMediaInfoResults(results) .Select(i => GetMediaSource(item, i)) @@ -1378,7 +1368,6 @@ namespace Emby.Server.Implementations.Channels if (channelVideoItem != null) { channelVideoItem.ExtraType = info.ExtraType; - channelVideoItem.ChannelMediaSources = info.MediaSources; var mediaSource = info.MediaSources.FirstOrDefault(); item.Path = mediaSource == null ? null : mediaSource.Path; diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 51f91acf31..688596ab8a 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -240,7 +240,6 @@ namespace Emby.Server.Implementations.Data AddColumn(db, "TypedBaseItems", "SourceType", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames); - AddColumn(db, "TypedBaseItems", "CriticRatingSummary", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames); @@ -454,7 +453,6 @@ namespace Emby.Server.Implementations.Data "DateLastMediaAdded", "Album", "CriticRating", - "CriticRatingSummary", "IsVirtualItem", "SeriesName", "SeasonName", @@ -579,7 +577,6 @@ namespace Emby.Server.Implementations.Data "SourceType", "TrailerTypes", "CriticRating", - "CriticRatingSummary", "InheritedTags", "CleanName", "PresentationUniqueKey", @@ -942,7 +939,6 @@ namespace Emby.Server.Implementations.Data } saveItemStatement.TryBind("@CriticRating", item.CriticRating); - saveItemStatement.TryBind("@CriticRatingSummary", item.CriticRatingSummary); var inheritedTags = item.InheritedTags; if (inheritedTags.Count > 0) @@ -1803,15 +1799,6 @@ namespace Emby.Server.Implementations.Data } index++; - if (query.HasField(ItemFields.CriticRatingSummary)) - { - if (!reader.IsDBNull(index)) - { - item.CriticRatingSummary = reader.GetString(index); - } - index++; - } - if (!reader.IsDBNull(index)) { item.IsVirtualItem = reader.GetBoolean(index); diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 43a1e6e694..78d76fd761 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -967,11 +967,6 @@ namespace Emby.Server.Implementations.Dto dto.CriticRating = item.CriticRating; - if (fields.Contains(ItemFields.CriticRatingSummary)) - { - dto.CriticRatingSummary = item.CriticRatingSummary; - } - var hasTrailers = item as IHasTrailers; if (hasTrailers != null) { diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 2fb35155d1..a33e58eb5a 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -2251,11 +2251,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(CultureInfo.InvariantCulture)); } - if (!string.IsNullOrEmpty(item.CriticRatingSummary)) - { - writer.WriteElementString("criticratingsummary", item.CriticRatingSummary); - } - if (!string.IsNullOrWhiteSpace(item.Tagline)) { writer.WriteElementString("tagline", item.Tagline); diff --git a/MediaBrowser.Api/ChannelService.cs b/MediaBrowser.Api/ChannelService.cs index 1eeb92530d..bce1e66829 100644 --- a/MediaBrowser.Api/ChannelService.cs +++ b/MediaBrowser.Api/ChannelService.cs @@ -98,7 +98,7 @@ namespace MediaBrowser.Api [ApiMember(Name = "SortBy", Description = "Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string SortBy { get; set; } - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } /// @@ -145,7 +145,7 @@ namespace MediaBrowser.Api [ApiMember(Name = "Filters", Description = "Optional. Specify additional filters to apply. This allows multiple, comma delimeted. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Filters { get; set; } - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "ChannelIds", Description = "Optional. Specify one or more channel id's, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index 686a3a296b..29530688c0 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -240,7 +240,6 @@ namespace MediaBrowser.Api item.OriginalTitle = string.IsNullOrWhiteSpace(request.OriginalTitle) ? null : request.OriginalTitle; item.CriticRating = request.CriticRating; - item.CriticRatingSummary = request.CriticRatingSummary; item.DisplayMediaType = request.DisplayMediaType; item.CommunityRating = request.CommunityRating; diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index 2d8744f70b..9fcdb4be56 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -98,7 +98,7 @@ namespace MediaBrowser.Api.LiveTv /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "AddCurrentProgram", Description = "Optional. Adds current program info to each channel", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] @@ -189,7 +189,7 @@ namespace MediaBrowser.Api.LiveTv /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } public bool EnableTotalRecordCount { get; set; } @@ -251,7 +251,7 @@ namespace MediaBrowser.Api.LiveTv /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } public bool EnableTotalRecordCount { get; set; } @@ -399,7 +399,7 @@ namespace MediaBrowser.Api.LiveTv /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } public GetPrograms() @@ -459,7 +459,7 @@ namespace MediaBrowser.Api.LiveTv /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "EnableUserData", Description = "Optional, include user data", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")] diff --git a/MediaBrowser.Api/PlaylistService.cs b/MediaBrowser.Api/PlaylistService.cs index bb2bc449b0..9f37bb70a2 100644 --- a/MediaBrowser.Api/PlaylistService.cs +++ b/MediaBrowser.Api/PlaylistService.cs @@ -102,7 +102,7 @@ namespace MediaBrowser.Api /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "EnableImages", Description = "Optional, include image information in output", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")] diff --git a/MediaBrowser.Api/SimilarItemsHelper.cs b/MediaBrowser.Api/SimilarItemsHelper.cs index 892c9f698a..5463ae9825 100644 --- a/MediaBrowser.Api/SimilarItemsHelper.cs +++ b/MediaBrowser.Api/SimilarItemsHelper.cs @@ -61,7 +61,7 @@ namespace MediaBrowser.Api /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } } diff --git a/MediaBrowser.Api/TvShowsService.cs b/MediaBrowser.Api/TvShowsService.cs index bc2b08384e..4b279031ee 100644 --- a/MediaBrowser.Api/TvShowsService.cs +++ b/MediaBrowser.Api/TvShowsService.cs @@ -48,7 +48,7 @@ namespace MediaBrowser.Api /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "SeriesId", Description = "Optional. Filter by series id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] @@ -108,7 +108,7 @@ namespace MediaBrowser.Api /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } /// @@ -150,7 +150,7 @@ namespace MediaBrowser.Api /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "Id", Description = "The series id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")] @@ -215,7 +215,7 @@ namespace MediaBrowser.Api /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "Id", Description = "The series id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")] diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs index 1acbce6dbd..55c23841cf 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs @@ -146,7 +146,7 @@ namespace MediaBrowser.Api.UserLibrary /// Fields to return within the items, in addition to basic information /// /// The fields. - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } /// diff --git a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs index 32f3a1f003..b1f196f15e 100644 --- a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs +++ b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs @@ -225,7 +225,7 @@ namespace MediaBrowser.Api.UserLibrary [ApiMember(Name = "ParentId", Description = "Specify this to localize the search to a specific item or folder. Omit to use the root", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] public string ParentId { get; set; } - [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + [ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Fields { get; set; } [ApiMember(Name = "IncludeItemTypes", Description = "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs index 59b5a38692..92d8d95bcf 100644 --- a/MediaBrowser.Controller/Entities/Audio/Audio.cs +++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs @@ -9,7 +9,6 @@ using System.Globalization; using System.Linq; using System.Threading; using MediaBrowser.Common.Extensions; -using MediaBrowser.Controller.Channels; using MediaBrowser.Model.Serialization; namespace MediaBrowser.Controller.Entities.Audio @@ -24,8 +23,6 @@ namespace MediaBrowser.Controller.Entities.Audio IHasLookupInfo, IHasMediaSources { - public List ChannelMediaSources { get; set; } - /// /// Gets or sets the artist. /// diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index c8ea4c506f..31b0783b2b 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -834,13 +834,6 @@ namespace MediaBrowser.Controller.Entities [IgnoreDataMember] public float? CriticRating { get; set; } - /// - /// Gets or sets the critic rating summary. - /// - /// The critic rating summary. - [IgnoreDataMember] - public string CriticRatingSummary { get; set; } - /// /// Gets or sets the official rating description. /// @@ -2298,11 +2291,6 @@ namespace MediaBrowser.Controller.Entities ownedItem.CustomRating = item.CustomRating; newOptions.ForceSave = true; } - if (!string.Equals(item.CriticRatingSummary, ownedItem.CriticRatingSummary, StringComparison.Ordinal)) - { - ownedItem.CriticRatingSummary = item.CriticRatingSummary; - newOptions.ForceSave = true; - } if (!string.Equals(item.OfficialRatingDescription, ownedItem.OfficialRatingDescription, StringComparison.Ordinal)) { ownedItem.OfficialRatingDescription = item.OfficialRatingDescription; diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index ea4d60a446..fb7748e134 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -187,7 +187,6 @@ namespace MediaBrowser.Controller.Entities case ItemFields.OriginalTitle: case ItemFields.Tags: case ItemFields.DateLastMediaAdded: - case ItemFields.CriticRatingSummary: return fields.Count == 0 || fields.Contains(name); default: return true; diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 5f5be16702..98f325bdc7 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -33,7 +33,6 @@ namespace MediaBrowser.Controller.Entities public List AdditionalParts { get; set; } public List LocalAlternateVersions { get; set; } public List LinkedAlternateVersions { get; set; } - public List ChannelMediaSources { get; set; } [IgnoreDataMember] public override bool SupportsPlayedStatus @@ -158,7 +157,6 @@ namespace MediaBrowser.Controller.Entities PlayableStreamFileNames = new List(); AdditionalParts = new List(); LocalAlternateVersions = new List(); - Tags = new List(); SubtitleFiles = new List(); LinkedAlternateVersions = new List(); } diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index e56bfb49c4..76507ac4d7 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -246,18 +246,6 @@ namespace MediaBrowser.LocalMetadata.Parsers break; } - case "CriticRatingSummary": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - item.CriticRatingSummary = val; - } - - break; - } - case "Language": { var val = reader.ReadElementContentAsString(); diff --git a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs index 105e685f42..78e79e54a5 100644 --- a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs @@ -46,7 +46,6 @@ namespace MediaBrowser.LocalMetadata.Savers "Countries", "CustomRating", "CriticRating", - "CriticRatingSummary", "DeathDate", "DisplayOrder", "EndDate", @@ -333,11 +332,6 @@ namespace MediaBrowser.LocalMetadata.Savers writer.WriteElementString("CriticRating", item.CriticRating.Value.ToString(UsCulture)); } - if (!string.IsNullOrEmpty(item.CriticRatingSummary)) - { - writer.WriteElementString("CriticRatingSummary", item.CriticRatingSummary); - } - if (!string.IsNullOrEmpty(item.Overview)) { writer.WriteElementString("Overview", item.Overview); diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index ae7d138680..1a752892ee 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -165,12 +165,6 @@ namespace MediaBrowser.Model.Dto public string[] ProductionLocations { get; set; } - /// - /// Gets or sets the critic rating summary. - /// - /// The critic rating summary. - public string CriticRatingSummary { get; set; } - public List MultiPartGameFiles { get; set; } /// diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 0caf645386..def47f645a 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -42,11 +42,6 @@ ChildCount, - /// - /// The critic rating summary - /// - CriticRatingSummary, - /// /// The cumulative run time ticks /// diff --git a/MediaBrowser.Providers/ImagesByName/ImageUtils.cs b/MediaBrowser.Providers/ImagesByName/ImageUtils.cs index bbcbbda905..6c51d5bd74 100644 --- a/MediaBrowser.Providers/ImagesByName/ImageUtils.cs +++ b/MediaBrowser.Providers/ImagesByName/ImageUtils.cs @@ -6,8 +6,6 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; namespace MediaBrowser.Providers.ImagesByName @@ -21,36 +19,37 @@ namespace MediaBrowser.Providers.ImagesByName /// The file. /// The HTTP client. /// The file system. - /// The semaphore. /// The cancellation token. /// Task. - public static async Task EnsureList(string url, string file, IHttpClient httpClient, IFileSystem fileSystem, SemaphoreSlim semaphore, CancellationToken cancellationToken) + public static async Task EnsureList(string url, string file, IHttpClient httpClient, IFileSystem fileSystem, CancellationToken cancellationToken) { var fileInfo = fileSystem.GetFileInfo(file); if (!fileInfo.Exists || (DateTime.UtcNow - fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays > 1) { - await semaphore.WaitAsync(cancellationToken).ConfigureAwait(false); + var temp = await httpClient.GetTempFile(new HttpRequestOptions + { + CancellationToken = cancellationToken, + Progress = new Progress(), + Url = url + + }).ConfigureAwait(false); + + fileSystem.CreateDirectory(Path.GetDirectoryName(file)); try { - var temp = await httpClient.GetTempFile(new HttpRequestOptions - { - CancellationToken = cancellationToken, - Progress = new Progress(), - Url = url - - }).ConfigureAwait(false); - - fileSystem.CreateDirectory(Path.GetDirectoryName(file)); - - fileSystem.CopyFile(temp, file, true); + fileSystem.CopyFile(temp, file, true); } - finally + catch { - semaphore.Release(); + } + + return temp; } + + return file; } public static string FindMatch(IHasImages item, IEnumerable images) diff --git a/MediaBrowser.Providers/Manager/ProviderUtils.cs b/MediaBrowser.Providers/Manager/ProviderUtils.cs index 34cf633509..13c12c8ffc 100644 --- a/MediaBrowser.Providers/Manager/ProviderUtils.cs +++ b/MediaBrowser.Providers/Manager/ProviderUtils.cs @@ -265,11 +265,6 @@ namespace MediaBrowser.Providers.Manager { target.CriticRating = source.CriticRating; } - - if (replaceData || string.IsNullOrEmpty(target.CriticRatingSummary)) - { - target.CriticRatingSummary = source.CriticRatingSummary; - } } private static void MergeTrailers(BaseItem source, BaseItem target, List lockedFields, bool replaceData) diff --git a/MediaBrowser.Providers/Studios/StudiosImageProvider.cs b/MediaBrowser.Providers/Studios/StudiosImageProvider.cs index bf017d1481..8579bd16b9 100644 --- a/MediaBrowser.Providers/Studios/StudiosImageProvider.cs +++ b/MediaBrowser.Providers/Studios/StudiosImageProvider.cs @@ -4,15 +4,12 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Providers; -using MediaBrowser.Providers.Genres; using MediaBrowser.Providers.ImagesByName; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; namespace MediaBrowser.Providers.Studios @@ -23,8 +20,6 @@ namespace MediaBrowser.Providers.Studios private readonly IHttpClient _httpClient; private readonly IFileSystem _fileSystem; - private readonly SemaphoreSlim _listResourcePool = new SemaphoreSlim(1, 1); - public StudiosImageProvider(IServerConfigurationManager config, IHttpClient httpClient, IFileSystem fileSystem) { _config = config; @@ -69,7 +64,7 @@ namespace MediaBrowser.Providers.Studios { var posterPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudioposters.txt"); - await EnsurePosterList(posterPath, cancellationToken).ConfigureAwait(false); + posterPath = await EnsurePosterList(posterPath, cancellationToken).ConfigureAwait(false); list.Add(GetImage(item, posterPath, ImageType.Primary, "folder")); } @@ -80,7 +75,7 @@ namespace MediaBrowser.Providers.Studios { var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt"); - await EnsureThumbsList(thumbsPath, cancellationToken).ConfigureAwait(false); + thumbsPath = await EnsureThumbsList(thumbsPath, cancellationToken).ConfigureAwait(false); list.Add(GetImage(item, thumbsPath, ImageType.Thumb, "thumb")); } @@ -114,18 +109,18 @@ namespace MediaBrowser.Providers.Studios return string.Format("https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studios/{0}/{1}.jpg", image, filename); } - private Task EnsureThumbsList(string file, CancellationToken cancellationToken) + private Task EnsureThumbsList(string file, CancellationToken cancellationToken) { const string url = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studiothumbs.txt"; - return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, _listResourcePool, cancellationToken); + return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, cancellationToken); } - private Task EnsurePosterList(string file, CancellationToken cancellationToken) + private Task EnsurePosterList(string file, CancellationToken cancellationToken) { const string url = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studioposters.txt"; - return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, _listResourcePool, cancellationToken); + return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, cancellationToken); } public int Order diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj index bcdfa858ff..d63987fde1 100644 --- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj +++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj @@ -108,6 +108,10 @@ + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + diff --git a/MediaBrowser.Server.Mono/packages.config b/MediaBrowser.Server.Mono/packages.config index 81da308f52..b9b604b16c 100644 --- a/MediaBrowser.Server.Mono/packages.config +++ b/MediaBrowser.Server.Mono/packages.config @@ -7,4 +7,5 @@ + \ No newline at end of file diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index 749468fe2b..3bda058111 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -114,6 +114,10 @@ + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + diff --git a/MediaBrowser.ServerApplication/Native/LoopUtil.cs b/MediaBrowser.ServerApplication/Native/LoopUtil.cs index 6160f853f4..9a96f5518e 100644 --- a/MediaBrowser.ServerApplication/Native/LoopUtil.cs +++ b/MediaBrowser.ServerApplication/Native/LoopUtil.cs @@ -145,16 +145,6 @@ namespace MediaBrowser.ServerApplication.Native { AppContainer app = new AppContainer(PI_app.appContainerName, PI_app.displayName, PI_app.workingDirectory, PI_app.appContainerSid); - var app_capabilities = LoopUtil.getCapabilites(PI_app.capabilities); - if (app_capabilities.Count > 0) - { - //var sid = new SecurityIdentifier(app_capabilities[0], 0); - - IntPtr arrayValue = IntPtr.Zero; - //var b = LoopUtil.ConvertStringSidToSid(app_capabilities[0].Sid, out arrayValue); - //string mysid; - //var b = LoopUtil.ConvertSidToStringSid(app_capabilities[0].Sid, out mysid); - } app.LoopUtil = CheckLoopback(PI_app.appContainerSid); Apps.Add(app); } @@ -209,42 +199,6 @@ namespace MediaBrowser.ServerApplication.Native util.SaveLoopbackState(); } - private static List getCapabilites(INET_FIREWALL_AC_CAPABILITIES cap) - { - List mycap = new List(); - - IntPtr arrayValue = cap.capabilities; - - var structSize = Marshal.SizeOf(typeof(SID_AND_ATTRIBUTES)); - for (var i = 0; i < cap.count; i++) - { - var cur = (SID_AND_ATTRIBUTES)Marshal.PtrToStructure(arrayValue, typeof(SID_AND_ATTRIBUTES)); - mycap.Add(cur); - arrayValue = new IntPtr((long)(arrayValue) + (long)(structSize)); - } - - return mycap; - - } - - private static List getContainerSID(INET_FIREWALL_AC_CAPABILITIES cap) - { - List mycap = new List(); - - IntPtr arrayValue = cap.capabilities; - - var structSize = Marshal.SizeOf(typeof(SID_AND_ATTRIBUTES)); - for (var i = 0; i < cap.count; i++) - { - var cur = (SID_AND_ATTRIBUTES)Marshal.PtrToStructure(arrayValue, typeof(SID_AND_ATTRIBUTES)); - mycap.Add(cur); - arrayValue = new IntPtr((long)(arrayValue) + (long)(structSize)); - } - - return mycap; - - } - private static List PI_NetworkIsolationGetAppContainerConfig() { diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index 68d0a7fdad..257d7898d0 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -7,4 +7,5 @@ + \ No newline at end of file diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index a12976f829..641ea4034c 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -358,18 +358,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers break; } - case "criticratingsummary": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - item.CriticRatingSummary = val; - } - - break; - } - case "language": { var val = reader.ReadElementContentAsString(); diff --git a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs index 02929f83d3..addb862ec8 100644 --- a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs @@ -56,7 +56,6 @@ namespace MediaBrowser.XbmcMetadata.Savers "tag", "runtime", "actor", - "criticratingsummary", "criticrating", "fileinfo", "director", @@ -662,11 +661,6 @@ namespace MediaBrowser.XbmcMetadata.Savers writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(UsCulture)); } - if (!string.IsNullOrEmpty(item.CriticRatingSummary)) - { - writer.WriteElementString("criticratingsummary", item.CriticRatingSummary); - } - var hasDisplayOrder = item as IHasDisplayOrder; if (hasDisplayOrder != null) From 6b17dd9db457fc1064b6d2b63389de8da624620a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 29 Apr 2017 02:22:52 -0400 Subject: [PATCH 6/6] 3.2.13.6 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 11d0391479..88b93bd20e 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.13.5")] +[assembly: AssemblyVersion("3.2.13.6")]