mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-24 02:54:43 +01:00
Merge branch 'master' into authenticationdb-efcore
# Conflicts: # Jellyfin.Server.Implementations/Security/AuthorizationContext.cs # MediaBrowser.Controller/Library/IUserManager.cs # MediaBrowser.Controller/Security/IAuthenticationRepository.cs # MediaBrowser.Controller/Session/ISessionManager.cs
This commit is contained in:
@@ -1,13 +1,26 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Model.Activity
|
||||
{
|
||||
/// <summary>
|
||||
/// An activity log entry.
|
||||
/// </summary>
|
||||
public class ActivityLogEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivityLogEntry"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="userId">The user id.</param>
|
||||
public ActivityLogEntry(string name, string type, Guid userId)
|
||||
{
|
||||
Name = name;
|
||||
Type = type;
|
||||
UserId = userId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
@@ -24,13 +37,13 @@ namespace MediaBrowser.Model.Activity
|
||||
/// Gets or sets the overview.
|
||||
/// </summary>
|
||||
/// <value>The overview.</value>
|
||||
public string Overview { get; set; }
|
||||
public string? Overview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the short overview.
|
||||
/// </summary>
|
||||
/// <value>The short overview.</value>
|
||||
public string ShortOverview { get; set; }
|
||||
public string? ShortOverview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
@@ -42,7 +55,7 @@ namespace MediaBrowser.Model.Activity
|
||||
/// Gets or sets the item identifier.
|
||||
/// </summary>
|
||||
/// <value>The item identifier.</value>
|
||||
public string ItemId { get; set; }
|
||||
public string? ItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date.
|
||||
@@ -61,7 +74,7 @@ namespace MediaBrowser.Model.Activity
|
||||
/// </summary>
|
||||
/// <value>The user primary image tag.</value>
|
||||
[Obsolete("UserPrimaryImageTag is not used.")]
|
||||
public string UserPrimaryImageTag { get; set; }
|
||||
public string? UserPrimaryImageTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the log severity.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Branding
|
||||
@@ -9,12 +8,12 @@ namespace MediaBrowser.Model.Branding
|
||||
/// Gets or sets the login disclaimer.
|
||||
/// </summary>
|
||||
/// <value>The login disclaimer.</value>
|
||||
public string LoginDisclaimer { get; set; }
|
||||
public string? LoginDisclaimer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the custom CSS.
|
||||
/// </summary>
|
||||
/// <value>The custom CSS.</value>
|
||||
public string CustomCss { get; set; }
|
||||
public string? CustomCss { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Channels
|
||||
{
|
||||
public class ChannelInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the home page URL.
|
||||
/// </summary>
|
||||
/// <value>The home page URL.</value>
|
||||
public string HomePageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the features.
|
||||
/// </summary>
|
||||
/// <value>The features.</value>
|
||||
public ChannelFeatures Features { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -469,64 +469,30 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <value><c>true</c> if this instance is anamorphic; otherwise, <c>false</c>.</value>
|
||||
public bool? IsAnamorphic { get; set; }
|
||||
|
||||
private string GetResolutionText()
|
||||
internal string GetResolutionText()
|
||||
{
|
||||
var i = this;
|
||||
|
||||
if (i.Width.HasValue && i.Height.HasValue)
|
||||
if (!Width.HasValue || !Height.HasValue)
|
||||
{
|
||||
var width = i.Width.Value;
|
||||
var height = i.Height.Value;
|
||||
|
||||
if (width >= 3800 || height >= 2000)
|
||||
{
|
||||
return "4K";
|
||||
}
|
||||
|
||||
if (width >= 2500)
|
||||
{
|
||||
if (i.IsInterlaced)
|
||||
{
|
||||
return "1440i";
|
||||
}
|
||||
|
||||
return "1440p";
|
||||
}
|
||||
|
||||
if (width >= 1900 || height >= 1000)
|
||||
{
|
||||
if (i.IsInterlaced)
|
||||
{
|
||||
return "1080i";
|
||||
}
|
||||
|
||||
return "1080p";
|
||||
}
|
||||
|
||||
if (width >= 1260 || height >= 700)
|
||||
{
|
||||
if (i.IsInterlaced)
|
||||
{
|
||||
return "720i";
|
||||
}
|
||||
|
||||
return "720p";
|
||||
}
|
||||
|
||||
if (width >= 700 || height >= 440)
|
||||
{
|
||||
if (i.IsInterlaced)
|
||||
{
|
||||
return "480i";
|
||||
}
|
||||
|
||||
return "480p";
|
||||
}
|
||||
|
||||
return "SD";
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
return Width switch
|
||||
{
|
||||
<= 720 when Height <= 480 => IsInterlaced ? "480i" : "480p",
|
||||
// 720x576 (PAL) (768 when rescaled for square pixels)
|
||||
<= 768 when Height <= 576 => IsInterlaced ? "576i" : "576p",
|
||||
// 960x540 (sometimes 544 which is multiple of 16)
|
||||
<= 960 when Height <= 544 => IsInterlaced ? "540i" : "540p",
|
||||
// 1280x720
|
||||
<= 1280 when Height <= 962 => IsInterlaced ? "720i" : "720p",
|
||||
// 1920x1080
|
||||
<= 1920 when Height <= 1440 => IsInterlaced ? "1080i" : "1080p",
|
||||
// 4K
|
||||
<= 4096 when Height <= 3072 => "4K",
|
||||
// 8K
|
||||
<= 8192 when Height <= 6144 => "8K",
|
||||
_ => null
|
||||
};
|
||||
}
|
||||
|
||||
public static bool IsTextFormat(string format)
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
<!-- <AnalysisMode>AllEnabledByDefault</AnalysisMode> -->
|
||||
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Stability)'=='Unstable'">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -14,6 +15,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
[assembly: InternalsVisibleTo("Jellyfin.Model.Tests")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
|
||||
48
MediaBrowser.Model/Session/HardwareEncodingType.cs
Normal file
48
MediaBrowser.Model/Session/HardwareEncodingType.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
namespace MediaBrowser.Model.Session
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum HardwareEncodingType.
|
||||
/// </summary>
|
||||
public enum HardwareEncodingType
|
||||
{
|
||||
/// <summary>
|
||||
/// AMD AMF
|
||||
/// </summary>
|
||||
AMF = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Intel Quick Sync Video
|
||||
/// </summary>
|
||||
QSV = 1,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA NVENC
|
||||
/// </summary>
|
||||
NVENC = 2,
|
||||
|
||||
/// <summary>
|
||||
/// OpenMax OMX
|
||||
/// </summary>
|
||||
OMX = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Exynos V4L2 MFC
|
||||
/// </summary>
|
||||
V4L2M2M = 4,
|
||||
|
||||
/// <summary>
|
||||
/// MediaCodec Android
|
||||
/// </summary>
|
||||
MediaCodec = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Video Acceleration API (VAAPI)
|
||||
/// </summary>
|
||||
VAAPI = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Video ToolBox
|
||||
/// </summary>
|
||||
VideoToolBox = 7
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,8 @@ namespace MediaBrowser.Model.Session
|
||||
|
||||
public int? AudioChannels { get; set; }
|
||||
|
||||
public HardwareEncodingType? HardwareAccelerationType { get; set; }
|
||||
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ namespace MediaBrowser.Model.System
|
||||
/// Gets or sets a value indicating whether this instance has update available.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
|
||||
[Obsolete("This should be handled by the package manager")]
|
||||
public bool HasUpdateAvailable { get; set; }
|
||||
|
||||
public FFmpegLocation EncoderLocation { get; set; }
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Users
|
||||
{
|
||||
public enum UserActionType
|
||||
{
|
||||
PlayedItem = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user