From e1379610e588d6226e50149942bd8589a2c0bb08 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 7 Jan 2019 16:58:33 +0100 Subject: [PATCH 1/9] Ground work to get plugins functional again --- MediaBrowser.Common/MediaBrowser.Common.csproj | 5 +++++ MediaBrowser.Controller/MediaBrowser.Controller.csproj | 5 +++++ MediaBrowser.Model/MediaBrowser.Model.csproj | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index f625a17eef..a485fa8be0 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -1,5 +1,10 @@  + + Jellyfin Contributors + Jellyfin.Common + + diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 4567f62dd5..3decbc42f7 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -1,5 +1,10 @@  + + Jellyfin Contributors + Jellyfin.Controller + + diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index fe10688426..e223f2cc81 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -1,5 +1,10 @@  + + Jellyfin Contributors + Jellyfin.Model + + netstandard2.0 false From 1f5b9a04fb42a31f0f218cd2a529d8aa69c4b440 Mon Sep 17 00:00:00 2001 From: Sparky Date: Mon, 7 Jan 2019 11:19:46 -0500 Subject: [PATCH 2/9] Open log files in browser again Fixes #485 Looks like we regressed and now only the .txt logs would open in the browser when clicked. Added in MimeType handler for .log files. Problem solved. --- MediaBrowser.Model/Net/MimeTypes.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index d66d62fea2..de35c5e120 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -183,6 +183,10 @@ namespace MediaBrowser.Model.Net { return "text/plain"; } + if (StringHelper.EqualsIgnoreCase(ext, ".log")) + { + return "text/plain"; + } if (StringHelper.EqualsIgnoreCase(ext, ".xml")) { return "application/xml"; From ae4a82570cda3cede46e8cc006a2e3c524d9d485 Mon Sep 17 00:00:00 2001 From: Sparky Date: Mon, 7 Jan 2019 11:23:11 -0500 Subject: [PATCH 3/9] Fixed odd formatting in MimeType.CS Think there might have been a mismatch between tabs and spaces. All spaces now. --- MediaBrowser.Model/Net/MimeTypes.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index d66d62fea2..8f0a99ebd8 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -228,10 +228,10 @@ namespace MediaBrowser.Model.Net if (StringHelper.EqualsIgnoreCase(ext, ".oga")) { return "audio/ogg"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".opus")) - { - return "audio/ogg"; + } + if (StringHelper.EqualsIgnoreCase(ext, ".opus")) + { + return "audio/ogg"; } if (StringHelper.EqualsIgnoreCase(ext, ".ac3")) { From 672e635742955222b39757ce94e9478e843ec3b4 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 7 Jan 2019 18:39:35 +0100 Subject: [PATCH 4/9] Remove unused resource --- Emby.Server.Implementations/Emby.Server.Implementations.csproj | 1 - Emby.Server.Implementations/values.txt | 0 2 files changed, 1 deletion(-) delete mode 100644 Emby.Server.Implementations/values.txt diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 2415050198..da3a4da073 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -45,7 +45,6 @@ - diff --git a/Emby.Server.Implementations/values.txt b/Emby.Server.Implementations/values.txt deleted file mode 100644 index e69de29bb2..0000000000 From 880825514a0d1f255699ce69783847374179c9a9 Mon Sep 17 00:00:00 2001 From: hawken Date: Mon, 7 Jan 2019 21:10:11 +0000 Subject: [PATCH 5/9] Fix regression where it would do integer divisions, giving wrong result --- MediaBrowser.Controller/Entities/Movies/BoxSet.cs | 2 +- MediaBrowser.Controller/Entities/Movies/Movie.cs | 2 +- MediaBrowser.Controller/Entities/TV/Episode.cs | 2 +- MediaBrowser.Controller/Entities/Trailer.cs | 2 +- MediaBrowser.Controller/LiveTv/LiveTvProgram.cs | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index e888a55825..51fb73df7a 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -64,7 +64,7 @@ namespace MediaBrowser.Controller.Entities.Movies } public override double GetDefaultPrimaryImageAspectRatio() - => 2 / 3; + => 2.0 / 3; public override UnratedItem GetBlockUnratedType() { diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index 4f743991bc..1d7e1cff19 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -51,7 +51,7 @@ namespace MediaBrowser.Controller.Entities.Movies return 0; } - return 2 / 3; + return 2.0 / 3; } protected override async Task RefreshedOwnedItems(MetadataRefreshOptions options, List fileSystemChildren, CancellationToken cancellationToken) diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 00e055c51a..0a367c5948 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -111,7 +111,7 @@ namespace MediaBrowser.Controller.Entities.TV return 0; } - return 16 / 9; + return 16.0 / 9; } public override List GetUserDataKeys() diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs index 2ef268ed18..d84ac187b0 100644 --- a/MediaBrowser.Controller/Entities/Trailer.cs +++ b/MediaBrowser.Controller/Entities/Trailer.cs @@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Entities public TrailerType[] TrailerTypes { get; set; } public override double GetDefaultPrimaryImageAspectRatio() - => 2 / 3; + => 2.0 / 3; public override UnratedItem GetBlockUnratedType() { diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index 4dc6c75173..c4a75d1999 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs @@ -54,11 +54,11 @@ namespace MediaBrowser.Controller.LiveTv if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase)) { - return 2 / 3; + return 2.0 / 3; } else { - return 16 / 9; + return 16.0 / 9; } } From 82a801c9ae0d7a5074ad0003d1aa5c2154da9382 Mon Sep 17 00:00:00 2001 From: hawken Date: Mon, 7 Jan 2019 21:16:38 +0000 Subject: [PATCH 6/9] Some less obvious ones that I was told were there --- Emby.Server.Implementations/LiveTv/LiveTvManager.cs | 6 +++--- .../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index b597a935a2..a81a0bcbb7 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -1056,7 +1056,7 @@ namespace Emby.Server.Implementations.LiveTv var numComplete = 0; double progressPerService = _services.Length == 0 ? 0 - : 1 / _services.Length; + : 1.0 / _services.Length; var newChannelIdList = new List(); var newProgramIdList = new List(); @@ -1262,7 +1262,7 @@ namespace Emby.Server.Implementations.LiveTv } numComplete++; - double percent = numComplete / allChannelsList.Count; + double percent = numComplete / (double) allChannelsList.Count; progress.Report(85 * percent + 15); } @@ -1307,7 +1307,7 @@ namespace Emby.Server.Implementations.LiveTv } numComplete++; - double percent = numComplete / list.Count; + double percent = numComplete / (double) list.Count; progress.Report(100 * percent); } diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs index b754d7cb52..95395f96c2 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs @@ -65,7 +65,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks foreach (var file in filesToDelete) { - double percent = index / filesToDelete.Count; + double percent = index / (double) filesToDelete.Count; progress.Report(100 * percent); From f9e52fed81feb21fb89d5dcdad99fc3c6db6800d Mon Sep 17 00:00:00 2001 From: LeoVerto Date: Tue, 8 Jan 2019 03:26:05 +0000 Subject: [PATCH 7/9] Fix CONTRIBUTORS.md formatting --- CONTRIBUTORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6517b63cd4..80c1723091 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -10,7 +10,7 @@ - [Bond_009](https://github.com/Bond-009) - [AnthonyLavado](https://github.com/anthonylavado) - [sparky8251](https://github.com/sparky8251) - - [LeoVerto](https://github.com/LeoVerto] + - [LeoVerto](https://github.com/LeoVerto) # Emby Contributors From 432be01934918eb9902e61793a2276aa63c01d9f Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 8 Jan 2019 22:10:11 +0100 Subject: [PATCH 8/9] Fix the DecodeJfif function to get image sizes Added support for progressive DCT-based JPEGs. By adding a check for the SOF2 marker (C2) --- Emby.Drawing/Common/ImageHeader.cs | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs index 7b819c2fd6..f37f396f59 100644 --- a/Emby.Drawing/Common/ImageHeader.cs +++ b/Emby.Drawing/Common/ImageHeader.cs @@ -121,7 +121,7 @@ namespace Emby.Drawing.Common /// /// The binary reader. /// System.Int16. - private static short ReadLittleEndianInt16(BinaryReader binaryReader) + private static short ReadLittleEndianInt16(this BinaryReader binaryReader) { var bytes = new byte[sizeof(short)]; @@ -137,7 +137,7 @@ namespace Emby.Drawing.Common /// /// The binary reader. /// System.Int32. - private static int ReadLittleEndianInt32(BinaryReader binaryReader) + private static int ReadLittleEndianInt32(this BinaryReader binaryReader) { var bytes = new byte[sizeof(int)]; for (int i = 0; i < sizeof(int); i += 1) @@ -205,25 +205,30 @@ namespace Emby.Drawing.Common /// private static ImageSize DecodeJfif(BinaryReader binaryReader) { + // A JPEG image consists of a sequence of segments, + // each beginning with a marker, each of which begins with a 0xFF byte + // followed by a byte indicating what kind of marker it is. + // Source: https://en.wikipedia.org/wiki/JPEG#Syntax_and_structure while (binaryReader.ReadByte() == 0xff) { byte marker = binaryReader.ReadByte(); - short chunkLength = ReadLittleEndianInt16(binaryReader); - if (marker == 0xc0) + short chunkLength = binaryReader.ReadLittleEndianInt16(); + // SOF0: Indicates that this is a baseline DCT-based JPEG, + // and specifies the width, height, number of components, and component subsampling + // SOF2: Indicates that this is a progressive DCT-based JPEG, + // and specifies the width, height, number of components, and component subsampling + if (marker == 0xc0 || marker == 0xc2) { - binaryReader.ReadByte(); - int height = ReadLittleEndianInt16(binaryReader); - int width = ReadLittleEndianInt16(binaryReader); - return new ImageSize - { - Width = width, - Height = height - }; + // https://help.accusoft.com/ImageGear/v18.2/Windows/ActiveX/IGAX-10-12.html + binaryReader.ReadByte(); // We don't care about the first byte + int height = binaryReader.ReadLittleEndianInt16(); + int width = binaryReader.ReadLittleEndianInt16(); + return new ImageSize(width, height); } if (chunkLength < 0) { - var uchunkLength = (ushort)chunkLength; + ushort uchunkLength = (ushort)chunkLength; binaryReader.ReadBytes(uchunkLength - 2); } else From f822d1c87192fa5a3590008638e5fa5d9f9b7490 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 8 Jan 2019 20:06:56 -0500 Subject: [PATCH 9/9] Bump version for 10.0.1 --- SharedVersion.cs | 2 +- debian/changelog | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 791d6cac55..0fbf7b9258 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("10.0.0")] +[assembly: AssemblyVersion("10.0.1")] diff --git a/debian/changelog b/debian/changelog index 61223e7253..685d31a5eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +jellyfin (10.0.1-1) unstable; urgency=medium + + * Hotfix release, corrects several small bugs from 10.0.0 + * #512: Fix CONTRIBUTORS.md formatting + * #501: Fix regression in integer divisions in latest movies category + * #498: Change contributing link in settings to readthedocs.io + * #493: Remove unused values.txt resource + * #491: Fix userprofile.js crash + * #519: Fix the DecodeJfif function to get proper image sizes + * #486: Add NuGet package info to plugin projects + + -- Joshua Boniface Tue, 08 Jan 2019 20:06:01 -0500 + jellyfin (10.0.0-1) unstable; urgency=medium * The first Jellyfin release under our new versioning scheme