diff options
| author | JPVenson <github@jpb.software> | 2025-02-21 11:08:09 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.software> | 2025-02-21 11:08:09 +0000 |
| commit | 8c0b0d910229d7691b638d2aee5aa5a8aa07fe17 (patch) | |
| tree | 2e4177bd57586f9e41747f582dddae9d70d78466 /MediaBrowser.Controller/Net | |
| parent | 963f2357a966dd7a5a6ab248155cc52ce066753b (diff) | |
| parent | 712908d53c7ca38d13e03ea7809e0c40e862a5fb (diff) | |
Merge remote-tracking branch 'jellyfinorigin/master' into feature/10.10/DetachedMigration
Diffstat (limited to 'MediaBrowser.Controller/Net')
| -rw-r--r-- | MediaBrowser.Controller/Net/AuthorizationInfo.cs | 20 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Net/IWebSocketConnection.cs | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Net/AuthorizationInfo.cs b/MediaBrowser.Controller/Net/AuthorizationInfo.cs index 2452b25ab..e452f2649 100644 --- a/MediaBrowser.Controller/Net/AuthorizationInfo.cs +++ b/MediaBrowser.Controller/Net/AuthorizationInfo.cs @@ -1,6 +1,5 @@ -#nullable disable - using System; +using System.Diagnostics.CodeAnalysis; using Jellyfin.Data.Entities; namespace MediaBrowser.Controller.Net @@ -20,31 +19,31 @@ namespace MediaBrowser.Controller.Net /// Gets or sets the device identifier. /// </summary> /// <value>The device identifier.</value> - public string DeviceId { get; set; } + public string? DeviceId { get; set; } /// <summary> /// Gets or sets the device. /// </summary> /// <value>The device.</value> - public string Device { get; set; } + public string? Device { get; set; } /// <summary> /// Gets or sets the client. /// </summary> /// <value>The client.</value> - public string Client { get; set; } + public string? Client { get; set; } /// <summary> /// Gets or sets the version. /// </summary> /// <value>The version.</value> - public string Version { get; set; } + public string? Version { get; set; } /// <summary> /// Gets or sets the token. /// </summary> /// <value>The token.</value> - public string Token { get; set; } + public string? Token { get; set; } /// <summary> /// Gets or sets a value indicating whether the authorization is from an api key. @@ -54,7 +53,7 @@ namespace MediaBrowser.Controller.Net /// <summary> /// Gets or sets the user making the request. /// </summary> - public User User { get; set; } + public User? User { get; set; } /// <summary> /// Gets or sets a value indicating whether the token is authenticated. @@ -62,8 +61,9 @@ namespace MediaBrowser.Controller.Net public bool IsAuthenticated { get; set; } /// <summary> - /// Gets or sets a value indicating whether the request has a token. + /// Gets a value indicating whether the request has a token. /// </summary> - public bool HasToken { get; set; } + [MemberNotNullWhen(true, nameof(Token))] + public bool HasToken => !string.IsNullOrWhiteSpace(Token); } } diff --git a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs index a47d2fa45..4757bfa30 100644 --- a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs +++ b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs @@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Net SingleWriter = false }); - private readonly object _activeConnectionsLock = new(); + private readonly Lock _activeConnectionsLock = new(); /// <summary> /// The _active connections. diff --git a/MediaBrowser.Controller/Net/IWebSocketConnection.cs b/MediaBrowser.Controller/Net/IWebSocketConnection.cs index bba5a6b85..bdc0f9a10 100644 --- a/MediaBrowser.Controller/Net/IWebSocketConnection.cs +++ b/MediaBrowser.Controller/Net/IWebSocketConnection.cs @@ -24,9 +24,9 @@ namespace MediaBrowser.Controller.Net DateTime LastActivityDate { get; } /// <summary> - /// Gets or sets the date of last Keeplive received. + /// Gets or sets the date of last Keepalive received. /// </summary> - /// <value>The date of last Keeplive received.</value> + /// <value>The date of last Keepalive received.</value> DateTime LastKeepAliveDate { get; set; } /// <summary> |
