aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Dto/UserItemDataDto.cs5
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs9
-rw-r--r--MediaBrowser.Model/Querying/QueryResult.cs85
-rw-r--r--MediaBrowser.Model/Session/UserDataChangeInfo.cs6
4 files changed, 61 insertions, 44 deletions
diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs
index adb2cd2ab..3bb45a0e0 100644
--- a/MediaBrowser.Model/Dto/UserItemDataDto.cs
+++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs
@@ -1,4 +1,3 @@
-#nullable disable
using System;
namespace MediaBrowser.Model.Dto
@@ -66,12 +65,12 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the key.
/// </summary>
/// <value>The key.</value>
- public string Key { get; set; }
+ public required string Key { get; set; }
/// <summary>
/// Gets or sets the item identifier.
/// </summary>
/// <value>The item identifier.</value>
- public string ItemId { get; set; }
+ public Guid ItemId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index dcb3febbd..20e011745 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -196,7 +196,7 @@ namespace MediaBrowser.Model.Entities
|| dvProfile == 8
|| dvProfile == 9))
{
- var title = "DV Profile " + dvProfile;
+ var title = "Dolby Vision Profile " + dvProfile;
if (dvBlCompatId > 0)
{
@@ -208,6 +208,7 @@ namespace MediaBrowser.Model.Entities
1 => title + " (HDR10)",
2 => title + " (SDR)",
4 => title + " (HLG)",
+ 6 => title + " (HDR10)", // Technically means Blu-ray, but practically always HDR10
_ => title
};
}
@@ -330,7 +331,11 @@ namespace MediaBrowser.Model.Entities
attributes.Add(Codec.ToUpperInvariant());
}
- if (VideoRange != VideoRange.Unknown)
+ if (VideoDoViTitle is not null)
+ {
+ attributes.Add(VideoDoViTitle);
+ }
+ else if (VideoRange != VideoRange.Unknown)
{
attributes.Add(VideoRange.ToString());
}
diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs
index ea843f34c..dd0d4fbfc 100644
--- a/MediaBrowser.Model/Querying/QueryResult.cs
+++ b/MediaBrowser.Model/Querying/QueryResult.cs
@@ -1,47 +1,60 @@
-#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
-namespace MediaBrowser.Model.Querying
+namespace MediaBrowser.Model.Querying;
+
+/// <summary>
+/// Query result container.
+/// </summary>
+/// <typeparam name="T">The type of item contained in the query result.</typeparam>
+public class QueryResult<T>
{
- public class QueryResult<T>
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueryResult{T}" /> class.
+ /// </summary>
+ public QueryResult()
{
- public QueryResult()
- {
- Items = Array.Empty<T>();
- }
+ Items = Array.Empty<T>();
+ }
- public QueryResult(IReadOnlyList<T> items)
- {
- Items = items;
- TotalRecordCount = items.Count;
- }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueryResult{T}" /> class.
+ /// </summary>
+ /// <param name="items">The list of items.</param>
+ public QueryResult(IReadOnlyList<T> items)
+ {
+ Items = items;
+ TotalRecordCount = items.Count;
+ }
- public QueryResult(int? startIndex, int? totalRecordCount, IReadOnlyList<T> items)
- {
- StartIndex = startIndex ?? 0;
- TotalRecordCount = totalRecordCount ?? items.Count;
- Items = items;
- }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueryResult{T}" /> class.
+ /// </summary>
+ /// <param name="startIndex">The start index that was used to build the item list.</param>
+ /// <param name="totalRecordCount">The total count of items.</param>
+ /// <param name="items">The list of items.</param>
+ 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>
- /// <value>The items.</value>
- public IReadOnlyList<T> Items { get; set; }
+ /// <summary>
+ /// Gets or sets the items.
+ /// </summary>
+ /// <value>The items.</value>
+ public IReadOnlyList<T> Items { get; set; }
- /// <summary>
- /// Gets or sets the total number of records available.
- /// </summary>
- /// <value>The total record count.</value>
- public int TotalRecordCount { get; set; }
+ /// <summary>
+ /// Gets or sets the total number of records available.
+ /// </summary>
+ /// <value>The total record count.</value>
+ public int TotalRecordCount { get; set; }
- /// <summary>
- /// Gets or sets the index of the first record in Items.
- /// </summary>
- /// <value>First record index.</value>
- public int StartIndex { get; set; }
- }
+ /// <summary>
+ /// Gets or sets the index of the first record in Items.
+ /// </summary>
+ /// <value>First record index.</value>
+ public int StartIndex { get; set; }
}
diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
index 0fd24edcc..ccd768da5 100644
--- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs
+++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
@@ -1,4 +1,4 @@
-#nullable disable
+using System;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.Session
@@ -12,12 +12,12 @@ namespace MediaBrowser.Model.Session
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
- public string UserId { get; set; }
+ public Guid UserId { get; set; }
/// <summary>
/// Gets or sets the user data list.
/// </summary>
/// <value>The user data list.</value>
- public UserItemDataDto[] UserDataList { get; set; }
+ public required UserItemDataDto[] UserDataList { get; set; }
}
}