mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	
						commit
						63f13df6fc
					
				@ -32,9 +32,11 @@
 | 
				
			|||||||
 - [nevado](https://github.com/nevado)
 | 
					 - [nevado](https://github.com/nevado)
 | 
				
			||||||
 - [mark-monteiro](https://github.com/mark-monteiro)
 | 
					 - [mark-monteiro](https://github.com/mark-monteiro)
 | 
				
			||||||
 - [ullmie02](https://github.com/ullmie02)
 | 
					 - [ullmie02](https://github.com/ullmie02)
 | 
				
			||||||
 | 
					 - [geilername](https://github.com/geilername)
 | 
				
			||||||
 - [pR0Ps](https://github.com/pR0Ps)
 | 
					 - [pR0Ps](https://github.com/pR0Ps)
 | 
				
			||||||
 - [artiume](https://github.com/Artiume)
 | 
					 - [artiume](https://github.com/Artiume)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Emby Contributors
 | 
					# Emby Contributors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 - [LukePulverenti](https://github.com/LukePulverenti)
 | 
					 - [LukePulverenti](https://github.com/LukePulverenti)
 | 
				
			||||||
 | 
				
			|||||||
@ -1522,7 +1522,7 @@ namespace Emby.Server.Implementations
 | 
				
			|||||||
            string baseUrl = ServerConfigurationManager.Configuration.BaseUrl;
 | 
					            string baseUrl = ServerConfigurationManager.Configuration.BaseUrl;
 | 
				
			||||||
            if (baseUrl.Length != 0)
 | 
					            if (baseUrl.Length != 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                url.Append('/').Append(baseUrl);
 | 
					                url.Append(baseUrl);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return url.ToString();
 | 
					            return url.ToString();
 | 
				
			||||||
 | 
				
			|||||||
@ -327,15 +327,19 @@ namespace MediaBrowser.Api.Playback
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        private bool EnableThrottling(StreamState state)
 | 
					        private bool EnableThrottling(StreamState state)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            var encodingOptions = ServerConfigurationManager.GetEncodingOptions();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // enable throttling when NOT using hardware acceleration
 | 
				
			||||||
 | 
					            if (encodingOptions.HardwareAccelerationType == string.Empty)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return state.InputProtocol == MediaProtocol.File &&
 | 
				
			||||||
 | 
					                       state.RunTimeTicks.HasValue &&
 | 
				
			||||||
 | 
					                       state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks &&
 | 
				
			||||||
 | 
					                       state.IsInputVideo &&
 | 
				
			||||||
 | 
					                       state.VideoType == VideoType.VideoFile &&
 | 
				
			||||||
 | 
					                       !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
            //// do not use throttling with hardware encoders
 | 
					 | 
				
			||||||
            //return state.InputProtocol == MediaProtocol.File &&
 | 
					 | 
				
			||||||
            //    state.RunTimeTicks.HasValue &&
 | 
					 | 
				
			||||||
            //    state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks &&
 | 
					 | 
				
			||||||
            //    state.IsInputVideo &&
 | 
					 | 
				
			||||||
            //    state.VideoType == VideoType.VideoFile &&
 | 
					 | 
				
			||||||
            //    !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) &&
 | 
					 | 
				
			||||||
            //    string.Equals(GetVideoEncoder(state), "libx264", StringComparison.OrdinalIgnoreCase);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,5 @@
 | 
				
			|||||||
 | 
					#nullable enable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using MediaBrowser.Controller.Entities;
 | 
					using MediaBrowser.Controller.Entities;
 | 
				
			||||||
using MediaBrowser.Model.Services;
 | 
					using MediaBrowser.Model.Services;
 | 
				
			||||||
using Microsoft.AspNetCore.Http;
 | 
					using Microsoft.AspNetCore.Http;
 | 
				
			||||||
@ -7,6 +9,6 @@ namespace MediaBrowser.Controller.Net
 | 
				
			|||||||
    public interface IAuthService
 | 
					    public interface IAuthService
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        void Authenticate(IRequest request, IAuthenticationAttributes authAttribtues);
 | 
					        void Authenticate(IRequest request, IAuthenticationAttributes authAttribtues);
 | 
				
			||||||
        User Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues);
 | 
					        User? Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -165,6 +165,7 @@ namespace MediaBrowser.Model.Configuration
 | 
				
			|||||||
        public bool SkipDeserializationForBasicTypes { get; set; }
 | 
					        public bool SkipDeserializationForBasicTypes { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string ServerName { get; set; }
 | 
					        public string ServerName { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string BaseUrl
 | 
					        public string BaseUrl
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            get => _baseUrl;
 | 
					            get => _baseUrl;
 | 
				
			||||||
 | 
				
			|||||||
@ -83,7 +83,7 @@ namespace Jellyfin.Api.Tests.Auth
 | 
				
			|||||||
                    a => a.Authenticate(
 | 
					                    a => a.Authenticate(
 | 
				
			||||||
                        It.IsAny<HttpRequest>(),
 | 
					                        It.IsAny<HttpRequest>(),
 | 
				
			||||||
                        It.IsAny<AuthenticatedAttribute>()))
 | 
					                        It.IsAny<AuthenticatedAttribute>()))
 | 
				
			||||||
                .Returns((User)null);
 | 
					                .Returns((User?)null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var authenticateResult = await _sut.AuthenticateAsync();
 | 
					            var authenticateResult = await _sut.AuthenticateAsync();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,8 @@
 | 
				
			|||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
					    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
				
			||||||
    <IsPackable>false</IsPackable>
 | 
					    <IsPackable>false</IsPackable>
 | 
				
			||||||
 | 
					    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,8 @@
 | 
				
			|||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
					    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
				
			||||||
    <IsPackable>false</IsPackable>
 | 
					    <IsPackable>false</IsPackable>
 | 
				
			||||||
 | 
					    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
				
			|||||||
@ -9,15 +9,15 @@ namespace Jellyfin.MediaEncoding.Tests
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    public class EncoderValidatorTests
 | 
					    public class EncoderValidatorTests
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private class GetFFmpegVersionTestData : IEnumerable<object[]>
 | 
					        private class GetFFmpegVersionTestData : IEnumerable<object?[]>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            public IEnumerator<object[]> GetEnumerator()
 | 
					            public IEnumerator<object?[]> GetEnumerator()
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                yield return new object[] { EncoderValidatorTestsData.FFmpegV421Output, new Version(4, 2, 1) };
 | 
					                yield return new object?[] { EncoderValidatorTestsData.FFmpegV421Output, new Version(4, 2, 1) };
 | 
				
			||||||
                yield return new object[] { EncoderValidatorTestsData.FFmpegV42Output, new Version(4, 2) };
 | 
					                yield return new object?[] { EncoderValidatorTestsData.FFmpegV42Output, new Version(4, 2) };
 | 
				
			||||||
                yield return new object[] { EncoderValidatorTestsData.FFmpegV414Output, new Version(4, 1, 4) };
 | 
					                yield return new object?[] { EncoderValidatorTestsData.FFmpegV414Output, new Version(4, 1, 4) };
 | 
				
			||||||
                yield return new object[] { EncoderValidatorTestsData.FFmpegV404Output, new Version(4, 0, 4) };
 | 
					                yield return new object?[] { EncoderValidatorTestsData.FFmpegV404Output, new Version(4, 0, 4) };
 | 
				
			||||||
                yield return new object[] { EncoderValidatorTestsData.FFmpegGitUnknownOutput, null };
 | 
					                yield return new object?[] { EncoderValidatorTestsData.FFmpegGitUnknownOutput, null };
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
 | 
					            IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
 | 
				
			||||||
@ -25,7 +25,7 @@ namespace Jellyfin.MediaEncoding.Tests
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        [Theory]
 | 
					        [Theory]
 | 
				
			||||||
        [ClassData(typeof(GetFFmpegVersionTestData))]
 | 
					        [ClassData(typeof(GetFFmpegVersionTestData))]
 | 
				
			||||||
        public void GetFFmpegVersionTest(string versionOutput, Version version)
 | 
					        public void GetFFmpegVersionTest(string versionOutput, Version? version)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Assert.Equal(version, EncoderValidator.GetFFmpegVersion(versionOutput));
 | 
					            Assert.Equal(version, EncoderValidator.GetFFmpegVersion(versionOutput));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,8 @@
 | 
				
			|||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
					    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
				
			||||||
    <IsPackable>false</IsPackable>
 | 
					    <IsPackable>false</IsPackable>
 | 
				
			||||||
 | 
					    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,7 @@
 | 
				
			|||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
					    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
				
			||||||
    <IsPackable>false</IsPackable>
 | 
					    <IsPackable>false</IsPackable>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,8 @@
 | 
				
			|||||||
    <PropertyGroup>
 | 
					    <PropertyGroup>
 | 
				
			||||||
      <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
					      <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
				
			||||||
      <IsPackable>false</IsPackable>
 | 
					      <IsPackable>false</IsPackable>
 | 
				
			||||||
 | 
					      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
 | 
				
			||||||
 | 
					      <Nullable>enable</Nullable>
 | 
				
			||||||
      <RootNamespace>Jellyfin.Server.Implementations.Tests</RootNamespace>
 | 
					      <RootNamespace>Jellyfin.Server.Implementations.Tests</RootNamespace>
 | 
				
			||||||
    </PropertyGroup>
 | 
					    </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user