diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-10-13 18:10:55 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-07 16:42:28 +0100 |
| commit | 71982c72972539ebd31b954d118601586658b916 (patch) | |
| tree | 60c64c5dd8f8a154cabf2d3d3f876a9342218d1d | |
| parent | 236dd650d0c9a4a8e4bad06b188387a1e6447de4 (diff) | |
Fix build errors
| -rw-r--r-- | Emby.Server.Implementations/ConfigurationOptions.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Api/Controllers/DisplayPreferencesController.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Api/Helpers/HlsHelpers.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Server/StartupOptions.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs index 01dc728c1c..f0a4c8ffbd 100644 --- a/Emby.Server.Implementations/ConfigurationOptions.cs +++ b/Emby.Server.Implementations/ConfigurationOptions.cs @@ -11,7 +11,7 @@ namespace Emby.Server.Implementations /// <summary> /// Gets a new copy of the default configuration options. /// </summary> - public static Dictionary<string, string> DefaultConfiguration => new Dictionary<string, string> + public static Dictionary<string, string?> DefaultConfiguration => new Dictionary<string, string?> { { HostWebClientKey, bool.TrueString }, { DefaultRedirectKey, "web/index.html" }, diff --git a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs index 14fd7eb3c1..67cceb4a8c 100644 --- a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs +++ b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs @@ -178,7 +178,7 @@ namespace Jellyfin.Api.Controllers foreach (var key in displayPreferences.CustomPrefs.Keys.Where(key => key.StartsWith("homesection", StringComparison.OrdinalIgnoreCase))) { - var order = int.Parse(key.AsSpan().Slice("homesection".Length), NumberStyles.Any, CultureInfo.InvariantCulture); + var order = int.Parse(key.AsSpan().Slice("homesection".Length), CultureInfo.InvariantCulture); if (!Enum.TryParse<HomeSectionType>(displayPreferences.CustomPrefs[key], true, out var type)) { type = order < 8 ? defaults[order] : HomeSectionType.None; diff --git a/Jellyfin.Api/Helpers/HlsHelpers.cs b/Jellyfin.Api/Helpers/HlsHelpers.cs index 0f6d2aef77..671107c1ff 100644 --- a/Jellyfin.Api/Helpers/HlsHelpers.cs +++ b/Jellyfin.Api/Helpers/HlsHelpers.cs @@ -46,7 +46,7 @@ namespace Jellyfin.Api.Helpers while (!reader.EndOfStream) { - var line = await reader.ReadLineAsync().ConfigureAwait(false); + var line = await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false); if (line is null) { // Nothing currently in buffer. diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs index 0a6f9bd920..0d9f379e0e 100644 --- a/Jellyfin.Server/StartupOptions.cs +++ b/Jellyfin.Server/StartupOptions.cs @@ -79,9 +79,9 @@ namespace Jellyfin.Server /// Gets the command line options as a dictionary that can be used in the .NET configuration system. /// </summary> /// <returns>The configuration dictionary.</returns> - public Dictionary<string, string> ConvertToConfig() + public Dictionary<string, string?> ConvertToConfig() { - var config = new Dictionary<string, string>(); + var config = new Dictionary<string, string?>(); if (NoWebClient) { diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index 4bc329a8a5..dd687edbb9 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -179,7 +179,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles _logger.LogDebug("charset {CharSet} detected for {Path}", result.EncodingName, fileInfo.Path); using var reader = new StreamReader(stream, result.Encoding); - var text = await reader.ReadToEndAsync().ConfigureAwait(false); + var text = await reader.ReadToEndAsync(cancellationToken).ConfigureAwait(false); return new MemoryStream(Encoding.UTF8.GetBytes(text)); } @@ -650,7 +650,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles { encoding = reader.CurrentEncoding; - text = await reader.ReadToEndAsync().ConfigureAwait(false); + text = await reader.ReadToEndAsync(cancellationToken).ConfigureAwait(false); } var newText = text.Replace(",Arial,", ",Arial Unicode MS,", StringComparison.Ordinal); |
