aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Branding/BrandingOptions.cs43
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs5
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs8
-rw-r--r--MediaBrowser.Model/Dto/BaseItemPerson.cs3
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj4
-rw-r--r--MediaBrowser.Model/Querying/QueryResult.cs7
6 files changed, 50 insertions, 20 deletions
diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs
index 7f19a5b85..cc42c1718 100644
--- a/MediaBrowser.Model/Branding/BrandingOptions.cs
+++ b/MediaBrowser.Model/Branding/BrandingOptions.cs
@@ -1,19 +1,32 @@
-#pragma warning disable CS1591
+using System.Text.Json.Serialization;
+using System.Xml.Serialization;
-namespace MediaBrowser.Model.Branding
+namespace MediaBrowser.Model.Branding;
+
+/// <summary>
+/// The branding options.
+/// </summary>
+public class BrandingOptions
{
- public class BrandingOptions
- {
- /// <summary>
- /// Gets or sets the login disclaimer.
- /// </summary>
- /// <value>The login disclaimer.</value>
- public string? LoginDisclaimer { get; set; }
+ /// <summary>
+ /// Gets or sets the login disclaimer.
+ /// </summary>
+ /// <value>The login disclaimer.</value>
+ public string? LoginDisclaimer { get; set; }
+
+ /// <summary>
+ /// Gets or sets the custom CSS.
+ /// </summary>
+ /// <value>The custom CSS.</value>
+ public string? CustomCss { get; set; }
- /// <summary>
- /// Gets or sets the custom CSS.
- /// </summary>
- /// <value>The custom CSS.</value>
- public string? CustomCss { get; set; }
- }
+ /// <summary>
+ /// Gets or sets the splashscreen location on disk.
+ /// </summary>
+ /// <remarks>
+ /// Not served via the API.
+ /// Only used to save the custom uploaded user splashscreen in the configuration file.
+ /// </remarks>
+ [JsonIgnore]
+ public string? SplashscreenLocation { get; set; }
}
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index d0ded99ea..51917b50e 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -1,3 +1,5 @@
+using System;
+
#nullable disable
#pragma warning disable CS1591
@@ -37,6 +39,7 @@ namespace MediaBrowser.Model.Configuration
EnableHardwareEncoding = true;
AllowHevcEncoding = false;
EnableSubtitleExtraction = true;
+ AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = Array.Empty<string>();
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
}
@@ -115,5 +118,7 @@ namespace MediaBrowser.Model.Configuration
public bool EnableSubtitleExtraction { get; set; }
public string[] HardwareDecodingCodecs { get; set; }
+
+ public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index a784025e3..094dc73b2 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -297,13 +297,13 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one.
/// </summary>
/// <value>The parent logo item id.</value>
- public string ParentLogoItemId { get; set; }
+ public Guid? ParentLogoItemId { get; set; }
/// <summary>
/// Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one.
/// </summary>
/// <value>The parent backdrop item id.</value>
- public string ParentBackdropItemId { get; set; }
+ public Guid? ParentBackdropItemId { get; set; }
/// <summary>
/// Gets or sets the parent backdrop image tags.
@@ -509,7 +509,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one.
/// </summary>
/// <value>The parent art item id.</value>
- public string ParentArtItemId { get; set; }
+ public Guid? ParentArtItemId { get; set; }
/// <summary>
/// Gets or sets the parent art image tag.
@@ -540,7 +540,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the parent thumb item id.
/// </summary>
/// <value>The parent thumb item id.</value>
- public string ParentThumbItemId { get; set; }
+ public Guid? ParentThumbItemId { get; set; }
/// <summary>
/// Gets or sets the parent thumb image tag.
diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs
index ddd7667ef..6b920b0ef 100644
--- a/MediaBrowser.Model/Dto/BaseItemPerson.cs
+++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs
@@ -1,4 +1,5 @@
#nullable disable
+using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using MediaBrowser.Model.Entities;
@@ -20,7 +21,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
- public string Id { get; set; }
+ public Guid Id { get; set; }
/// <summary>
/// Gets or sets the role.
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 63f7ada5c..b54a40b42 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -49,6 +49,10 @@
<!-- Code Analyzers-->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3">
+ <PrivateAssets>all</PrivateAssets>
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
+ </PackageReference>
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.376" PrivateAssets="All" />
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs
index 8ce794800..ea843f34c 100644
--- a/MediaBrowser.Model/Querying/QueryResult.cs
+++ b/MediaBrowser.Model/Querying/QueryResult.cs
@@ -19,6 +19,13 @@ namespace MediaBrowser.Model.Querying
TotalRecordCount = items.Count;
}
+ public QueryResult(int? startIndex, int? totalRecordCount, IReadOnlyList<T> items)
+ {
+ StartIndex = startIndex ?? 0;
+ TotalRecordCount = totalRecordCount ?? items.Count;
+ Items = items;
+ }
+
/// <summary>
/// Gets or sets the items.
/// </summary>