aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Entities')
-rw-r--r--MediaBrowser.Model/Entities/ChapterInfo.cs1
-rw-r--r--MediaBrowser.Model/Entities/DisplayPreferences.cs1
-rw-r--r--MediaBrowser.Model/Entities/IHasProviderIds.cs2
-rw-r--r--MediaBrowser.Model/Entities/LibraryUpdateInfo.cs29
-rw-r--r--MediaBrowser.Model/Entities/MediaAttachment.cs1
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs53
-rw-r--r--MediaBrowser.Model/Entities/MediaUrl.cs1
-rw-r--r--MediaBrowser.Model/Entities/MetadataFields.cs2
-rw-r--r--MediaBrowser.Model/Entities/MetadataProvider.cs (renamed from MediaBrowser.Model/Entities/MetadataProviders.cs)2
-rw-r--r--MediaBrowser.Model/Entities/PackageReviewInfo.cs13
-rw-r--r--MediaBrowser.Model/Entities/ParentalRating.cs24
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs16
-rw-r--r--MediaBrowser.Model/Entities/VirtualFolderInfo.cs1
13 files changed, 94 insertions, 52 deletions
diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs
index bea7ec1db..45554c3dc 100644
--- a/MediaBrowser.Model/Entities/ChapterInfo.cs
+++ b/MediaBrowser.Model/Entities/ChapterInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs
index 2cd8bd306..0e5db01dd 100644
--- a/MediaBrowser.Model/Entities/DisplayPreferences.cs
+++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System.Collections.Generic;
namespace MediaBrowser.Model.Entities
diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs
index c117efde9..1310f68ae 100644
--- a/MediaBrowser.Model/Entities/IHasProviderIds.cs
+++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repition by using extension methods.
+ /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repetition by using extension methods.
/// </summary>
public interface IHasProviderIds
{
diff --git a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
index b98c00240..6dd6653dc 100644
--- a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
+++ b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
@@ -5,15 +5,29 @@ using System;
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Class LibraryUpdateInfo
+ /// Class LibraryUpdateInfo.
/// </summary>
public class LibraryUpdateInfo
{
/// <summary>
+ /// Initializes a new instance of the <see cref="LibraryUpdateInfo"/> class.
+ /// </summary>
+ public LibraryUpdateInfo()
+ {
+ FoldersAddedTo = Array.Empty<string>();
+ FoldersRemovedFrom = Array.Empty<string>();
+ ItemsAdded = Array.Empty<string>();
+ ItemsRemoved = Array.Empty<string>();
+ ItemsUpdated = Array.Empty<string>();
+ CollectionFolders = Array.Empty<string>();
+ }
+
+ /// <summary>
/// Gets or sets the folders added to.
/// </summary>
/// <value>The folders added to.</value>
public string[] FoldersAddedTo { get; set; }
+
/// <summary>
/// Gets or sets the folders removed from.
/// </summary>
@@ -41,18 +55,5 @@ namespace MediaBrowser.Model.Entities
public string[] CollectionFolders { get; set; }
public bool IsEmpty => FoldersAddedTo.Length == 0 && FoldersRemovedFrom.Length == 0 && ItemsAdded.Length == 0 && ItemsRemoved.Length == 0 && ItemsUpdated.Length == 0 && CollectionFolders.Length == 0;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="LibraryUpdateInfo"/> class.
- /// </summary>
- public LibraryUpdateInfo()
- {
- FoldersAddedTo = Array.Empty<string>();
- FoldersRemovedFrom = Array.Empty<string>();
- ItemsAdded = Array.Empty<string>();
- ItemsRemoved = Array.Empty<string>();
- ItemsUpdated = Array.Empty<string>();
- CollectionFolders = Array.Empty<string>();
- }
}
}
diff --git a/MediaBrowser.Model/Entities/MediaAttachment.cs b/MediaBrowser.Model/Entities/MediaAttachment.cs
index 167be18c9..34e3eabc9 100644
--- a/MediaBrowser.Model/Entities/MediaAttachment.cs
+++ b/MediaBrowser.Model/Entities/MediaAttachment.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Entities
{
/// <summary>
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index e7e8d7cec..fa09cc513 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -34,8 +35,22 @@ namespace MediaBrowser.Model.Entities
/// <value>The language.</value>
public string Language { get; set; }
+ /// <summary>
+ /// Gets or sets the color transfer.
+ /// </summary>
+ /// <value>The color transfer.</value>
public string ColorTransfer { get; set; }
+
+ /// <summary>
+ /// Gets or sets the color primaries.
+ /// </summary>
+ /// <value>The color primaries.</value>
public string ColorPrimaries { get; set; }
+
+ /// <summary>
+ /// Gets or sets the color space.
+ /// </summary>
+ /// <value>The color space.</value>
public string ColorSpace { get; set; }
/// <summary>
@@ -44,11 +59,28 @@ namespace MediaBrowser.Model.Entities
/// <value>The comment.</value>
public string Comment { get; set; }
+ /// <summary>
+ /// Gets or sets the time base.
+ /// </summary>
+ /// <value>The time base.</value>
public string TimeBase { get; set; }
+
+ /// <summary>
+ /// Gets or sets the codec time base.
+ /// </summary>
+ /// <value>The codec time base.</value>
public string CodecTimeBase { get; set; }
+ /// <summary>
+ /// Gets or sets the title.
+ /// </summary>
+ /// <value>The title.</value>
public string Title { get; set; }
+ /// <summary>
+ /// Gets or sets the video range.
+ /// </summary>
+ /// <value>The video range.</value>
public string VideoRange
{
get
@@ -60,7 +92,8 @@ namespace MediaBrowser.Model.Entities
var colorTransfer = ColorTransfer;
- if (string.Equals(colorTransfer, "smpte2084", StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(colorTransfer, "smpte2084", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(colorTransfer, "arib-std-b67", StringComparison.OrdinalIgnoreCase))
{
return "HDR";
}
@@ -70,7 +103,9 @@ namespace MediaBrowser.Model.Entities
}
public string localizedUndefined { get; set; }
+
public string localizedDefault { get; set; }
+
public string localizedForced { get; set; }
public string DisplayTitle
@@ -197,34 +232,34 @@ namespace MediaBrowser.Model.Entities
{
if (i.IsInterlaced)
{
- return "1440I";
+ return "1440i";
}
- return "1440P";
+ return "1440p";
}
if (width >= 1900 || height >= 1000)
{
if (i.IsInterlaced)
{
- return "1080I";
+ return "1080i";
}
- return "1080P";
+ return "1080p";
}
if (width >= 1260 || height >= 700)
{
if (i.IsInterlaced)
{
- return "720I";
+ return "720i";
}
- return "720P";
+ return "720p";
}
if (width >= 700 || height >= 440)
{
if (i.IsInterlaced)
{
- return "480I";
+ return "480i";
}
- return "480P";
+ return "480p";
}
return "SD";
diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs
index e44143755..74f982437 100644
--- a/MediaBrowser.Model/Entities/MediaUrl.cs
+++ b/MediaBrowser.Model/Entities/MediaUrl.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Entities
diff --git a/MediaBrowser.Model/Entities/MetadataFields.cs b/MediaBrowser.Model/Entities/MetadataFields.cs
index d64d4f4da..2cc6c8e33 100644
--- a/MediaBrowser.Model/Entities/MetadataFields.cs
+++ b/MediaBrowser.Model/Entities/MetadataFields.cs
@@ -3,7 +3,7 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// Enum MetadataFields.
/// </summary>
- public enum MetadataFields
+ public enum MetadataField
{
/// <summary>
/// The cast.
diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProvider.cs
index 1a44a1661..bcc2b48e7 100644
--- a/MediaBrowser.Model/Entities/MetadataProviders.cs
+++ b/MediaBrowser.Model/Entities/MetadataProvider.cs
@@ -5,7 +5,7 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// Enum MetadataProviders
/// </summary>
- public enum MetadataProviders
+ public enum MetadataProvider
{
/// <summary>
/// The imdb
diff --git a/MediaBrowser.Model/Entities/PackageReviewInfo.cs b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
index a034de8ba..1ebbc3323 100644
--- a/MediaBrowser.Model/Entities/PackageReviewInfo.cs
+++ b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,32 +8,32 @@ namespace MediaBrowser.Model.Entities
public class PackageReviewInfo
{
/// <summary>
- /// The package id (database key) for this review
+ /// Gets or sets the package id (database key) for this review.
/// </summary>
public int id { get; set; }
/// <summary>
- /// The rating value
+ /// Gets or sets the rating value.
/// </summary>
public int rating { get; set; }
/// <summary>
- /// Whether or not this review recommends this item
+ /// Gets or sets whether or not this review recommends this item.
/// </summary>
public bool recommend { get; set; }
/// <summary>
- /// A short description of the review
+ /// Gets or sets a short description of the review.
/// </summary>
public string title { get; set; }
/// <summary>
- /// A full review
+ /// Gets or sets the full review.
/// </summary>
public string review { get; set; }
/// <summary>
- /// Time of review
+ /// Gets or sets the time of review.
/// </summary>
public DateTime timestamp { get; set; }
diff --git a/MediaBrowser.Model/Entities/ParentalRating.cs b/MediaBrowser.Model/Entities/ParentalRating.cs
index 4b37bd64a..17b2868a3 100644
--- a/MediaBrowser.Model/Entities/ParentalRating.cs
+++ b/MediaBrowser.Model/Entities/ParentalRating.cs
@@ -1,12 +1,23 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Class ParentalRating
+ /// Class ParentalRating.
/// </summary>
public class ParentalRating
{
+ public ParentalRating()
+ {
+ }
+
+ public ParentalRating(string name, int value)
+ {
+ Name = name;
+ Value = value;
+ }
+
/// <summary>
/// Gets or sets the name.
/// </summary>
@@ -18,16 +29,5 @@ namespace MediaBrowser.Model.Entities
/// </summary>
/// <value>The value.</value>
public int Value { get; set; }
-
- public ParentalRating()
- {
-
- }
-
- public ParentalRating(string name, int value)
- {
- Name = name;
- Value = value;
- }
}
}
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
index cd387bd54..9c11fe0ad 100644
--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -14,29 +14,29 @@ namespace MediaBrowser.Model.Entities
/// <param name="instance">The instance.</param>
/// <param name="provider">The provider.</param>
/// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
- public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
+ public static bool HasProviderId(this IHasProviderIds instance, MetadataProvider provider)
{
return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
}
/// <summary>
- /// Gets a provider id
+ /// Gets a provider id.
/// </summary>
/// <param name="instance">The instance.</param>
/// <param name="provider">The provider.</param>
/// <returns>System.String.</returns>
- public static string GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
+ public static string? GetProviderId(this IHasProviderIds instance, MetadataProvider provider)
{
return instance.GetProviderId(provider.ToString());
}
/// <summary>
- /// Gets a provider id
+ /// Gets a provider id.
/// </summary>
/// <param name="instance">The instance.</param>
/// <param name="name">The name.</param>
/// <returns>System.String.</returns>
- public static string GetProviderId(this IHasProviderIds instance, string name)
+ public static string? GetProviderId(this IHasProviderIds instance, string name)
{
if (instance == null)
{
@@ -53,7 +53,7 @@ namespace MediaBrowser.Model.Entities
}
/// <summary>
- /// Sets a provider id
+ /// Sets a provider id.
/// </summary>
/// <param name="instance">The instance.</param>
/// <param name="name">The name.</param>
@@ -89,12 +89,12 @@ namespace MediaBrowser.Model.Entities
}
/// <summary>
- /// Sets a provider id
+ /// Sets a provider id.
/// </summary>
/// <param name="instance">The instance.</param>
/// <param name="provider">The provider.</param>
/// <param name="value">The value.</param>
- public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
+ public static void SetProviderId(this IHasProviderIds instance, MetadataProvider provider, string value)
{
instance.SetProviderId(provider.ToString(), value);
}
diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
index dd30c9c84..2de02e403 100644
--- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
+++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;