diff options
27 files changed, 90 insertions, 122 deletions
diff --git a/.gitignore b/.gitignore index befba5a20..880e63a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -234,7 +234,6 @@ pip-log.txt #Mr Developer .mr.developer.cfg -MediaBrowser.WebDashboard/dashboard-ui/.idea/ /.vs ########## diff --git a/.gitmodules b/.gitmodules index 31a58ecf1..7aeb94dfc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "ThirdParty/taglib-sharp"] path = ThirdParty/taglib-sharp url = https://github.com/mono/taglib-sharp.git +[submodule "MediaBrowser.WebDashboard/jellyfin-web"] + path = MediaBrowser.WebDashboard/jellyfin-web + url = https://github.com/jellyfin/jellyfin-web.git diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6517b63cd..80c172309 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 diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs index 7b819c2fd..f37f396f5 100644 --- a/Emby.Drawing/Common/ImageHeader.cs +++ b/Emby.Drawing/Common/ImageHeader.cs @@ -121,7 +121,7 @@ namespace Emby.Drawing.Common /// </summary> /// <param name="binaryReader">The binary reader.</param> /// <returns>System.Int16.</returns> - 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 /// </summary> /// <param name="binaryReader">The binary reader.</param> /// <returns>System.Int32.</returns> - 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 /// <exception cref="System.ArgumentException"></exception> 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 diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs index ea4417071..d82d2f2fb 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs @@ -44,13 +44,13 @@ namespace IsoMounter _logger.LogDebug( "[{0}] System PATH is currently set to [{1}].", Name, - EnvironmentInfo.GetEnvironmentVariable("PATH") ?? "" + Environment.GetEnvironmentVariable("PATH") ?? "" ); _logger.LogDebug( "[{0}] System path separator is [{1}].", Name, - EnvironmentInfo.PathSeparator + Path.PathSeparator ); _logger.LogDebug( @@ -118,25 +118,27 @@ namespace IsoMounter public bool CanMount(string path) { - if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Linux) { - _logger.LogInformation( - "[{0}] Checking we can attempt to mount [{1}], Extension = [{2}], Operating System = [{3}], Executables Available = [{4}].", - Name, - path, - Path.GetExtension(path), - EnvironmentInfo.OperatingSystem, - ExecutablesAvailable.ToString() - ); - - if (ExecutablesAvailable) { - return string.Equals(Path.GetExtension(path), ".iso", StringComparison.OrdinalIgnoreCase); - } else { - return false; - } - } else { + if (EnvironmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Linux) + { return false; } + _logger.LogInformation( + "[{0}] Checking we can attempt to mount [{1}], Extension = [{2}], Operating System = [{3}], Executables Available = [{4}].", + Name, + path, + Path.GetExtension(path), + EnvironmentInfo.OperatingSystem, + ExecutablesAvailable.ToString() + ); + if (ExecutablesAvailable) + { + return string.Equals(Path.GetExtension(path), ".iso", StringComparison.OrdinalIgnoreCase); + } + else + { + return false; + } } public Task Install(CancellationToken cancellationToken) @@ -211,18 +213,16 @@ namespace IsoMounter private string GetFullPathForExecutable(string name) { - foreach (string test in (EnvironmentInfo.GetEnvironmentVariable("PATH") ?? "").Split(EnvironmentInfo.PathSeparator)) { - + foreach (string test in (Environment.GetEnvironmentVariable("PATH") ?? "").Split(Path.PathSeparator)) + { string path = test.Trim(); if (!String.IsNullOrEmpty(path) && FileSystem.FileExists(path = Path.Combine(path, name))) { return FileSystem.GetFullPath(path); } - } - return String.Empty; - + return string.Empty; } private uint GetUID() diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ab8a85806..b020b33c3 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1188,8 +1188,7 @@ namespace Emby.Server.Implementations HttpClient, ZipClient, ProcessFactory, - 5000, - EnvironmentInfo); + 5000); MediaEncoder = mediaEncoder; RegisterSingleInstance(MediaEncoder); diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 241505019..da3a4da07 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -45,7 +45,6 @@ <EmbeddedResource Include="TextEncoding\NLangDetect\Profiles\*" /> <EmbeddedResource Include="TextEncoding\NLangDetect\Utils\messages.properties" /> <EmbeddedResource Include="Localization\Ratings\*.txt" /> - <EmbeddedResource Include="values.txt" /> </ItemGroup> </Project> diff --git a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs index 03e10e7ea..655867577 100644 --- a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs +++ b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs @@ -1,11 +1,9 @@ using System; -using System.IO; using MediaBrowser.Model.System; using System.Runtime.InteropServices; namespace Emby.Server.Implementations.EnvironmentInfo { - // TODO: Rework @bond public class EnvironmentInfo : IEnvironmentInfo { public EnvironmentInfo(MediaBrowser.Model.System.OperatingSystem operatingSystem) @@ -39,29 +37,6 @@ namespace Emby.Server.Implementations.EnvironmentInfo } } - public char PathSeparator - { - get - { - return Path.PathSeparator; - } - } - public Architecture SystemArchitecture { get { return RuntimeInformation.OSArchitecture; } } - - public string GetEnvironmentVariable(string name) - { - return Environment.GetEnvironmentVariable(name); - } - - public string StackTrace - { - get { return Environment.StackTrace; } - } - - public void SetProcessEnvironmentVariable(string name, string value) - { - Environment.SetEnvironmentVariable(name, value); - } } } diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 63e940ac2..b84b4682a 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<Guid>(); var newProgramIdList = new List<Guid>(); @@ -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 c3ef81f14..b8994f471 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); diff --git a/Emby.Server.Implementations/values.txt b/Emby.Server.Implementations/values.txt deleted file mode 100644 index e69de29bb..000000000 --- a/Emby.Server.Implementations/values.txt +++ /dev/null diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index f625a17ee..a485fa8be 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -1,5 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <Authors>Jellyfin Contributors</Authors> + <PackageId>Jellyfin.Common</PackageId> + </PropertyGroup> + <ItemGroup> <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" /> </ItemGroup> diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index e888a5582..51fb73df7 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 4f743991b..1d7e1cff1 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<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken) diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 00e055c51..0a367c594 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<string> GetUserDataKeys() diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs index 2ef268ed1..d84ac187b 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/IServerApplicationPaths.cs b/MediaBrowser.Controller/IServerApplicationPaths.cs index 7f2605fab..0358b9264 100644 --- a/MediaBrowser.Controller/IServerApplicationPaths.cs +++ b/MediaBrowser.Controller/IServerApplicationPaths.cs @@ -12,7 +12,6 @@ namespace MediaBrowser.Controller /// <summary> /// Gets the application resources path. This is the path to the folder containing resources that are deployed as part of the application - /// For example, this folder contains dashboard-ui and swagger-ui /// </summary> /// <value>The application resources path.</value> string ApplicationResourcesPath { get; } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index 4dc6c7517..c4a75d199 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; } } diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 4567f62dd..3decbc42f 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -1,5 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <Authors>Jellyfin Contributors</Authors> + <PackageId>Jellyfin.Controller</PackageId> + </PropertyGroup> + <ItemGroup> <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" /> <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" /> diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index 96fe416b2..a13795548 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -70,7 +70,6 @@ namespace MediaBrowser.MediaEncoding.Encoder private readonly string _originalFFMpegPath; private readonly string _originalFFProbePath; private readonly int DefaultImageExtractionTimeoutMs; - private readonly IEnvironmentInfo _environmentInfo; public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, @@ -89,8 +88,7 @@ namespace MediaBrowser.MediaEncoding.Encoder IHttpClient httpClient, IZipClient zipClient, IProcessFactory processFactory, - int defaultImageExtractionTimeoutMs, - IEnvironmentInfo environmentInfo) + int defaultImageExtractionTimeoutMs) { _logger = logger; _jsonSerializer = jsonSerializer; @@ -107,46 +105,13 @@ namespace MediaBrowser.MediaEncoding.Encoder _zipClient = zipClient; _processFactory = processFactory; DefaultImageExtractionTimeoutMs = defaultImageExtractionTimeoutMs; - _environmentInfo = environmentInfo; FFProbePath = ffProbePath; FFMpegPath = ffMpegPath; _originalFFProbePath = ffProbePath; _originalFFMpegPath = ffMpegPath; - _hasExternalEncoder = hasExternalEncoder; } - private readonly object _logLock = new object(); - public void SetLogFilename(string name) - { - lock (_logLock) - { - try - { - _environmentInfo.SetProcessEnvironmentVariable("FFREPORT", "file=" + name + ":level=32"); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error setting FFREPORT environment variable"); - } - } - } - - public void ClearLogFilename() - { - lock (_logLock) - { - try - { - _environmentInfo.SetProcessEnvironmentVariable("FFREPORT", null); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error setting FFREPORT environment variable"); - } - } - } - public string EncoderLocationType { get diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index fe1068842..e223f2cc8 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -1,6 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> + <Authors>Jellyfin Contributors</Authors> + <PackageId>Jellyfin.Model</PackageId> + </PropertyGroup> + + <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs index 6af514dc8..faf9f0a42 100644 --- a/MediaBrowser.Model/System/IEnvironmentInfo.cs +++ b/MediaBrowser.Model/System/IEnvironmentInfo.cs @@ -8,10 +8,6 @@ namespace MediaBrowser.Model.System string OperatingSystemName { get; } string OperatingSystemVersion { get; } Architecture SystemArchitecture { get; } - string GetEnvironmentVariable(string name); - void SetProcessEnvironmentVariable(string name, string value); - string StackTrace { get; } - char PathSeparator { get; } } public enum OperatingSystem diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index e67629269..ef4f9c2af 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -138,9 +138,9 @@ namespace MediaBrowser.WebDashboard.Api } /// <summary> - /// Gets the dashboard UI path. + /// Gets the path for the web interface. /// </summary> - /// <value>The dashboard UI path.</value> + /// <value>The path for the web interface.</value> public string DashboardUIPath { get @@ -150,7 +150,7 @@ namespace MediaBrowser.WebDashboard.Api return _serverConfigurationManager.Configuration.DashboardSourcePath; } - return Path.Combine(_serverConfigurationManager.ApplicationPaths.ApplicationResourcesPath, "dashboard-ui"); + return Path.Combine(_serverConfigurationManager.ApplicationPaths.ApplicationResourcesPath, "jellyfin-web", "src"); } } diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 855b8b627..c5367ba75 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -10,7 +10,7 @@ </ItemGroup>
<ItemGroup>
- <None Include="dashboard-ui\**\*.*">
+ <None Include="jellyfin-web\src\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
diff --git a/MediaBrowser.WebDashboard/jellyfin-web b/MediaBrowser.WebDashboard/jellyfin-web new file mode 160000 +Subproject 4678528d0028685b45c7c6daa2e24b72a363535 diff --git a/SharedVersion.cs b/SharedVersion.cs index 791d6cac5..0fbf7b925 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 61223e725..685d31a5e 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 <joshua@boniface.me> 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 |
