Merge branch 'master' into network-rewrite

This commit is contained in:
Shadowghost
2022-10-07 09:04:41 +02:00
121 changed files with 625 additions and 1076 deletions

View File

@@ -5,7 +5,6 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
public enum EmbeddedSubtitleOptions
{
/// <summary>
/// Allow all embedded subs.
/// </summary>
@@ -26,5 +25,4 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
AllowNone = 3,
}
}

View File

@@ -29,10 +29,7 @@ namespace MediaBrowser.Model.Cryptography
public PasswordHash(string id, byte[] hash, byte[] salt, Dictionary<string, string> parameters)
{
if (id == null)
{
throw new ArgumentNullException(nameof(id));
}
ArgumentNullException.ThrowIfNull(id);
if (id.Length == 0)
{

View File

@@ -8,7 +8,7 @@ using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Model.Dlna
{
public class ContentFeatureBuilder
public static class ContentFeatureBuilder
{
public static string BuildImageHeader(
DeviceProfile profile,

View File

@@ -565,10 +565,7 @@ namespace MediaBrowser.Model.Dlna
private StreamInfo BuildVideoItem(MediaSourceInfo item, VideoOptions options)
{
if (item == null)
{
throw new ArgumentNullException(nameof(item));
}
ArgumentNullException.ThrowIfNull(item);
StreamInfo playlistItem = new StreamInfo
{

View File

@@ -23,6 +23,11 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// The embedded image.
/// </summary>
EmbeddedImage
EmbeddedImage,
/// <summary>
/// The data.
/// </summary>
Data
}
}

View File

@@ -28,10 +28,7 @@ namespace MediaBrowser.Model.Entities
/// <returns><c>true</c> if a provider id with the given name was found; otherwise <c>false</c>.</returns>
public static bool HasProviderId(this IHasProviderIds instance, string name)
{
if (instance == null)
{
throw new ArgumentNullException(nameof(instance));
}
ArgumentNullException.ThrowIfNull(instance);
return instance.TryGetProviderId(name, out _);
}
@@ -56,10 +53,7 @@ namespace MediaBrowser.Model.Entities
/// <returns><c>true</c> if a provider id with the given name was found; otherwise <c>false</c>.</returns>
public static bool TryGetProviderId(this IHasProviderIds instance, string name, [NotNullWhen(true)] out string? id)
{
if (instance == null)
{
throw new ArgumentNullException(nameof(instance));
}
ArgumentNullException.ThrowIfNull(instance);
if (instance.ProviderIds == null)
{
@@ -121,10 +115,7 @@ namespace MediaBrowser.Model.Entities
/// <param name="value">The value.</param>
public static void SetProviderId(this IHasProviderIds instance, string name, string? value)
{
if (instance == null)
{
throw new ArgumentNullException(nameof(instance));
}
ArgumentNullException.ThrowIfNull(instance);
// If it's null remove the key from the dictionary
if (string.IsNullOrEmpty(value))

View File

@@ -100,7 +100,7 @@ namespace MediaBrowser.Model.Search
public BaseItemKind Type { get; set; }
/// <summary>
/// Gets a value indicating whether this instance is folder.
/// Gets or sets a value indicating whether this instance is folder.
/// </summary>
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
public bool? IsFolder { get; set; }