From 71982c72972539ebd31b954d118601586658b916 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 13 Oct 2022 18:10:55 +0200 Subject: [PATCH] Fix build errors --- Emby.Server.Implementations/ConfigurationOptions.cs | 2 +- Jellyfin.Api/Controllers/DisplayPreferencesController.cs | 2 +- Jellyfin.Api/Helpers/HlsHelpers.cs | 2 +- Jellyfin.Server/StartupOptions.cs | 4 ++-- 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 /// /// Gets a new copy of the default configuration options. /// - public static Dictionary DefaultConfiguration => new Dictionary + public static Dictionary DefaultConfiguration => new Dictionary { { 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(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. /// /// The configuration dictionary. - public Dictionary ConvertToConfig() + public Dictionary ConvertToConfig() { - var config = new Dictionary(); + var config = new Dictionary(); 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);