diff options
| author | Bond-009 <bond.009@outlook.com> | 2022-12-07 16:39:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-07 16:39:40 +0100 |
| commit | f3c57e6a0ae015dc51cf548a0380d1bed33959c2 (patch) | |
| tree | 1052ce5b7646e4fea7b20768213e89c0e38126ec /src | |
| parent | 681be595cea8254cbac5bbb3bdc9083c4780db21 (diff) | |
| parent | 52194f56b5f07e3ae01e2fb6d121452e37d1e93f (diff) | |
Merge pull request #8511 from Bond-009/isnull
Diffstat (limited to 'src')
| -rw-r--r-- | src/Jellyfin.Extensions/AlphanumericComparator.cs | 6 | ||||
| -rw-r--r-- | src/Jellyfin.MediaEncoding.Hls/Cache/CacheDecorator.cs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Jellyfin.Extensions/AlphanumericComparator.cs b/src/Jellyfin.Extensions/AlphanumericComparator.cs index 98a32d5b2..1b19752bb 100644 --- a/src/Jellyfin.Extensions/AlphanumericComparator.cs +++ b/src/Jellyfin.Extensions/AlphanumericComparator.cs @@ -16,15 +16,15 @@ namespace Jellyfin.Extensions /// <returns>A signed integer that indicates the relative values of <c>x</c> and <c>y</c>.</returns> public static int CompareValues(string? s1, string? s2) { - if (s1 == null && s2 == null) + if (s1 is null && s2 is null) { return 0; } - else if (s1 == null) + else if (s1 is null) { return -1; } - else if (s2 == null) + else if (s2 is null) { return 1; } diff --git a/src/Jellyfin.MediaEncoding.Hls/Cache/CacheDecorator.cs b/src/Jellyfin.MediaEncoding.Hls/Cache/CacheDecorator.cs index 09816c960..360a96290 100644 --- a/src/Jellyfin.MediaEncoding.Hls/Cache/CacheDecorator.cs +++ b/src/Jellyfin.MediaEncoding.Hls/Cache/CacheDecorator.cs @@ -87,7 +87,7 @@ public class CacheDecorator : IKeyframeExtractor { var bytes = File.ReadAllBytes(cachePath); cachedResult = JsonSerializer.Deserialize<KeyframeData>(bytes, _jsonOptions); - return cachedResult != null; + return cachedResult is not null; } cachedResult = null; |
