aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs6
-rw-r--r--MediaBrowser.Model/Dlna/ConditionProcessor.cs4
-rw-r--r--MediaBrowser.Model/Dlna/DirectPlayProfile.cs2
-rw-r--r--MediaBrowser.Model/Drawing/ImageFormatExtensions.cs8
-rw-r--r--MediaBrowser.Model/Dto/SessionInfoDto.cs2
-rw-r--r--MediaBrowser.Model/Entities/HardwareAccelerationType.cs2
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs6
-rw-r--r--MediaBrowser.Model/Entities/MetadataProvider.cs2
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs6
-rw-r--r--MediaBrowser.Model/Extensions/ContainerHelper.cs15
-rw-r--r--MediaBrowser.Model/Globalization/ILocalizationManager.cs2
-rw-r--r--MediaBrowser.Model/IO/IFileSystem.cs4
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs3
-rw-r--r--MediaBrowser.Model/Plugins/PluginStatus.cs7
-rw-r--r--MediaBrowser.Model/Session/TranscodingInfo.cs2
-rw-r--r--MediaBrowser.Model/System/PublicSystemInfo.cs2
16 files changed, 42 insertions, 31 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 623a901c9..693bf90e7 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -83,9 +83,9 @@ public class ServerConfiguration : BaseApplicationConfiguration
public bool QuickConnectAvailable { get; set; } = true;
/// <summary>
- /// Gets or sets a value indicating whether [enable case sensitive item ids].
+ /// Gets or sets a value indicating whether [enable case-sensitive item ids].
/// </summary>
- /// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
+ /// <value><c>true</c> if [enable case-sensitive item ids]; otherwise, <c>false</c>.</value>
public bool EnableCaseSensitiveItemIds { get; set; } = true;
public bool DisableLiveTvChannelUserDataName { get; set; } = true;
@@ -249,7 +249,7 @@ public class ServerConfiguration : BaseApplicationConfiguration
public bool AllowClientLogUpload { get; set; } = true;
/// <summary>
- /// Gets or sets the dummy chapter duration in seconds, use 0 (zero) or less to disable generation alltogether.
+ /// Gets or sets the dummy chapter duration in seconds, use 0 (zero) or less to disable generation altogether.
/// </summary>
/// <value>The dummy chapters duration.</value>
public int DummyChapterDuration { get; set; }
diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
index af0787990..1b046f54e 100644
--- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs
+++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
@@ -25,8 +25,8 @@ namespace MediaBrowser.Model.Dlna
/// <param name="videoFramerate">The framerate.</param>
/// <param name="packetLength">The packet length.</param>
/// <param name="timestamp">The <see cref="TransportStreamTimestamp"/>.</param>
- /// <param name="isAnamorphic">A value indicating whether tthe video is anamorphic.</param>
- /// <param name="isInterlaced">A value indicating whether tthe video is interlaced.</param>
+ /// <param name="isAnamorphic">A value indicating whether the video is anamorphic.</param>
+ /// <param name="isInterlaced">A value indicating whether the video is interlaced.</param>
/// <param name="refFrames">The reference frames.</param>
/// <param name="numVideoStreams">The number of video streams.</param>
/// <param name="numAudioStreams">The number of audio streams.</param>
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
index 438df3441..553ccfc64 100644
--- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
+++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
@@ -59,7 +59,7 @@ public class DirectPlayProfile
/// <returns>True if supported.</returns>
public bool SupportsAudioCodec(string? codec)
{
- // Video profiles can have audio codec restrictions too, therefore incude Video as valid type.
+ // Video profiles can have audio codec restrictions too, therefore include Video as valid type.
return (Type == DlnaProfileType.Audio || Type == DlnaProfileType.Video) && ContainerHelper.ContainsContainer(AudioCodec, codec);
}
}
diff --git a/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs b/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs
index 1c60ba460..53b9b1fad 100644
--- a/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs
+++ b/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs
@@ -17,12 +17,12 @@ public static class ImageFormatExtensions
public static string GetMimeType(this ImageFormat format)
=> format switch
{
- ImageFormat.Bmp => "image/bmp",
+ ImageFormat.Bmp => MediaTypeNames.Image.Bmp,
ImageFormat.Gif => MediaTypeNames.Image.Gif,
ImageFormat.Jpg => MediaTypeNames.Image.Jpeg,
- ImageFormat.Png => "image/png",
- ImageFormat.Webp => "image/webp",
- ImageFormat.Svg => "image/svg+xml",
+ ImageFormat.Png => MediaTypeNames.Image.Png,
+ ImageFormat.Webp => MediaTypeNames.Image.Webp,
+ ImageFormat.Svg => MediaTypeNames.Image.Svg,
_ => throw new InvalidEnumArgumentException(nameof(format), (int)format, typeof(ImageFormat))
};
diff --git a/MediaBrowser.Model/Dto/SessionInfoDto.cs b/MediaBrowser.Model/Dto/SessionInfoDto.cs
index 2496c933a..d727cd874 100644
--- a/MediaBrowser.Model/Dto/SessionInfoDto.cs
+++ b/MediaBrowser.Model/Dto/SessionInfoDto.cs
@@ -163,7 +163,7 @@ public class SessionInfoDto
/// <summary>
/// Gets or sets the playlist item id.
/// </summary>
- /// <value>The splaylist item id.</value>
+ /// <value>The playlist item id.</value>
public string? PlaylistItemId { get; set; }
/// <summary>
diff --git a/MediaBrowser.Model/Entities/HardwareAccelerationType.cs b/MediaBrowser.Model/Entities/HardwareAccelerationType.cs
index 198a2e00f..ece18ec3e 100644
--- a/MediaBrowser.Model/Entities/HardwareAccelerationType.cs
+++ b/MediaBrowser.Model/Entities/HardwareAccelerationType.cs
@@ -8,7 +8,7 @@ namespace MediaBrowser.Model.Entities;
public enum HardwareAccelerationType
{
/// <summary>
- /// Software accelleration.
+ /// Software acceleration.
/// </summary>
none = 0,
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 85c1f797b..218a22aa2 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -383,7 +383,7 @@ namespace MediaBrowser.Model.Entities
attributes.Add(string.IsNullOrEmpty(LocalizedUndefined) ? "Und" : LocalizedUndefined);
}
- if (IsHearingImpaired)
+ if (IsHearingImpaired == true)
{
attributes.Add(string.IsNullOrEmpty(LocalizedHearingImpaired) ? "Hearing Impaired" : LocalizedHearingImpaired);
}
@@ -500,7 +500,7 @@ namespace MediaBrowser.Model.Entities
/// Gets or sets a value indicating whether this instance is for the hearing impaired.
/// </summary>
/// <value><c>true</c> if this instance is for the hearing impaired; otherwise, <c>false</c>.</value>
- public bool IsHearingImpaired { get; set; }
+ public bool? IsHearingImpaired { get; set; }
/// <summary>
/// Gets or sets the height.
@@ -537,7 +537,7 @@ namespace MediaBrowser.Model.Entities
get
{
// In some cases AverageFrameRate for videos will be read as 1000fps even if it is not.
- // This is probably due to a library compatability issue.
+ // This is probably due to a library compatibility issue.
// See https://github.com/jellyfin/jellyfin/pull/12603#discussion_r1748044018 for more info.
return AverageFrameRate < 1000 ? AverageFrameRate : RealFrameRate;
}
diff --git a/MediaBrowser.Model/Entities/MetadataProvider.cs b/MediaBrowser.Model/Entities/MetadataProvider.cs
index bd8db9941..dcc4ae88c 100644
--- a/MediaBrowser.Model/Entities/MetadataProvider.cs
+++ b/MediaBrowser.Model/Entities/MetadataProvider.cs
@@ -27,7 +27,7 @@ namespace MediaBrowser.Model.Entities
Tvdb = 4,
/// <summary>
- /// The tvcom providerd.
+ /// The tvcom provider.
/// </summary>
Tvcom = 5,
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
index 479ec7712..385a86d31 100644
--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Entities;
public static class ProviderIdsExtensions
{
/// <summary>
- /// Case insensitive dictionary of <see cref="MetadataProvider"/> string representation.
+ /// Case-insensitive dictionary of <see cref="MetadataProvider"/> string representation.
/// </summary>
private static readonly Dictionary<string, string> _metadataProviderEnumDictionary =
Enum.GetValues<MetadataProvider>()
@@ -107,7 +107,7 @@ public static class ProviderIdsExtensions
/// <param name="instance">The instance.</param>
/// <param name="name">The name, this should not contain a '=' character.</param>
/// <param name="value">The value.</param>
- /// <remarks>Due to how deserialization from the database works the name can not contain '='.</remarks>
+ /// <remarks>Due to how deserialization from the database works the name cannot contain '='.</remarks>
/// <returns><c>true</c> if the provider id got set successfully; otherwise, <c>false</c>.</returns>
public static bool TrySetProviderId(this IHasProviderIds instance, string? name, string? value)
{
@@ -153,7 +153,7 @@ public static class ProviderIdsExtensions
/// <param name="instance">The instance.</param>
/// <param name="name">The name, this should not contain a '=' character.</param>
/// <param name="value">The value.</param>
- /// <remarks>Due to how deserialization from the database works the name can not contain '='.</remarks>
+ /// <remarks>Due to how deserialization from the database works the name cannot contain '='.</remarks>
public static void SetProviderId(this IHasProviderIds instance, string name, string value)
{
ArgumentNullException.ThrowIfNull(instance);
diff --git a/MediaBrowser.Model/Extensions/ContainerHelper.cs b/MediaBrowser.Model/Extensions/ContainerHelper.cs
index c86328ba6..39e5358ba 100644
--- a/MediaBrowser.Model/Extensions/ContainerHelper.cs
+++ b/MediaBrowser.Model/Extensions/ContainerHelper.cs
@@ -14,7 +14,8 @@ public static class ContainerHelper
/// in <paramref name="profileContainers"/>.
/// </summary>
/// <param name="profileContainers">The comma-delimited string being searched.
- /// If the parameter begins with the <c>-</c> character, the operation is reversed.</param>
+ /// If the parameter begins with the <c>-</c> character, the operation is reversed.
+ /// If the parameter is empty or null, all containers in <paramref name="inputContainer"/> will be accepted.</param>
/// <param name="inputContainer">The comma-delimited string being matched.</param>
/// <returns>The result of the operation.</returns>
public static bool ContainsContainer(string? profileContainers, string? inputContainer)
@@ -34,7 +35,8 @@ public static class ContainerHelper
/// in <paramref name="profileContainers"/>.
/// </summary>
/// <param name="profileContainers">The comma-delimited string being searched.
- /// If the parameter begins with the <c>-</c> character, the operation is reversed.</param>
+ /// If the parameter begins with the <c>-</c> character, the operation is reversed.
+ /// If the parameter is empty or null, all containers in <paramref name="inputContainer"/> will be accepted.</param>
/// <param name="inputContainer">The comma-delimited string being matched.</param>
/// <returns>The result of the operation.</returns>
public static bool ContainsContainer(string? profileContainers, ReadOnlySpan<char> inputContainer)
@@ -53,7 +55,8 @@ public static class ContainerHelper
/// Compares two containers, returning <paramref name="isNegativeList"/> if an item in <paramref name="inputContainer"/>
/// does not exist in <paramref name="profileContainers"/>.
/// </summary>
- /// <param name="profileContainers">The comma-delimited string being searched.</param>
+ /// <param name="profileContainers">The comma-delimited string being searched.
+ /// If the parameter is empty or null, all containers in <paramref name="inputContainer"/> will be accepted.</param>
/// <param name="isNegativeList">The boolean result to return if a match is not found.</param>
/// <param name="inputContainer">The comma-delimited string being matched.</param>
/// <returns>The result of the operation.</returns>
@@ -71,7 +74,8 @@ public static class ContainerHelper
/// Compares two containers, returning <paramref name="isNegativeList"/> if an item in <paramref name="inputContainer"/>
/// does not exist in <paramref name="profileContainers"/>.
/// </summary>
- /// <param name="profileContainers">The comma-delimited string being searched.</param>
+ /// <param name="profileContainers">The comma-delimited string being searched.
+ /// If the parameter is empty or null, all containers in <paramref name="inputContainer"/> will be accepted.</param>
/// <param name="isNegativeList">The boolean result to return if a match is not found.</param>
/// <param name="inputContainer">The comma-delimited string being matched.</param>
/// <returns>The result of the operation.</returns>
@@ -106,7 +110,8 @@ public static class ContainerHelper
/// Compares two containers, returning <paramref name="isNegativeList"/> if an item in <paramref name="inputContainer"/>
/// does not exist in <paramref name="profileContainers"/>.
/// </summary>
- /// <param name="profileContainers">The profile containers being matched searched.</param>
+ /// <param name="profileContainers">The profile containers being matched searched.
+ /// If the parameter is empty or null, all containers in <paramref name="inputContainer"/> will be accepted.</param>
/// <param name="isNegativeList">The boolean result to return if a match is not found.</param>
/// <param name="inputContainer">The comma-delimited string being matched.</param>
/// <returns>The result of the operation.</returns>
diff --git a/MediaBrowser.Model/Globalization/ILocalizationManager.cs b/MediaBrowser.Model/Globalization/ILocalizationManager.cs
index 02a29e7fa..20deaa505 100644
--- a/MediaBrowser.Model/Globalization/ILocalizationManager.cs
+++ b/MediaBrowser.Model/Globalization/ILocalizationManager.cs
@@ -52,7 +52,7 @@ namespace MediaBrowser.Model.Globalization
/// <summary>
/// Gets the localization options.
/// </summary>
- /// <returns><see cref="IEnumerable{LocalizatonOption}" />.</returns>
+ /// <returns><see cref="IEnumerable{LocalizationOption}" />.</returns>
IEnumerable<LocalizationOption> GetLocalizationOptions();
/// <summary>
diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs
index 2085328dd..229368d00 100644
--- a/MediaBrowser.Model/IO/IFileSystem.cs
+++ b/MediaBrowser.Model/IO/IFileSystem.cs
@@ -145,7 +145,7 @@ namespace MediaBrowser.Model.IO
/// Gets the directories.
/// </summary>
/// <param name="path">The path.</param>
- /// <param name="recursive">If set to <c>true</c> also searches in subdirectiories.</param>
+ /// <param name="recursive">If set to <c>true</c> also searches in subdirectories.</param>
/// <returns>All found directories.</returns>
IEnumerable<FileSystemMetadata> GetDirectories(string path, bool recursive = false);
@@ -153,7 +153,7 @@ namespace MediaBrowser.Model.IO
/// Gets the files.
/// </summary>
/// <param name="path">The path in which to search.</param>
- /// <param name="recursive">If set to <c>true</c> also searches in subdirectiories.</param>
+ /// <param name="recursive">If set to <c>true</c> also searches in subdirectories.</param>
/// <returns>All found files.</returns>
IEnumerable<FileSystemMetadata> GetFiles(string path, bool recursive = false);
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index e4c0239b8..de087d0e7 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
+using System.Net.Mime;
using Jellyfin.Extensions;
namespace MediaBrowser.Model.Net
@@ -144,7 +145,7 @@ namespace MediaBrowser.Model.Net
new("video/x-matroska", ".mkv"),
}.ToFrozenDictionary(pair => pair.Key, pair => pair.Value, StringComparer.OrdinalIgnoreCase);
- public static string GetMimeType(string path) => GetMimeType(path, "application/octet-stream");
+ public static string GetMimeType(string path) => GetMimeType(path, MediaTypeNames.Application.Octet);
/// <summary>
/// Gets the type of the MIME.
diff --git a/MediaBrowser.Model/Plugins/PluginStatus.cs b/MediaBrowser.Model/Plugins/PluginStatus.cs
index bd420d7b4..9c7a8f0c2 100644
--- a/MediaBrowser.Model/Plugins/PluginStatus.cs
+++ b/MediaBrowser.Model/Plugins/PluginStatus.cs
@@ -34,7 +34,12 @@ namespace MediaBrowser.Model.Plugins
Malfunctioned = -3,
/// <summary>
- /// This plugin has been superceded by another version.
+ /// This plugin has been superseded by another version.
+ /// </summary>
+ Superseded = -4,
+
+ /// <summary>
+ /// [DEPRECATED] See Superseded.
/// </summary>
Superceded = -4,
diff --git a/MediaBrowser.Model/Session/TranscodingInfo.cs b/MediaBrowser.Model/Session/TranscodingInfo.cs
index ae25267ac..11e83844b 100644
--- a/MediaBrowser.Model/Session/TranscodingInfo.cs
+++ b/MediaBrowser.Model/Session/TranscodingInfo.cs
@@ -5,7 +5,7 @@ using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Session;
/// <summary>
-/// Class holding information on a runnning transcode.
+/// Class holding information on a running transcode.
/// </summary>
public class TranscodingInfo
{
diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs
index 31a895642..c26cfb667 100644
--- a/MediaBrowser.Model/System/PublicSystemInfo.cs
+++ b/MediaBrowser.Model/System/PublicSystemInfo.cs
@@ -47,7 +47,7 @@ namespace MediaBrowser.Model.System
/// Gets or sets a value indicating whether the startup wizard is completed.
/// </summary>
/// <remarks>
- /// Nullable for OpenAPI specification only to retain backwards compatibility in apiclients.
+ /// Nullable for OpenAPI specification only to retain backwards compatibility in api clients.
/// </remarks>
/// <value>The startup completion status.</value>]
public bool? StartupWizardCompleted { get; set; }