The Free Software Media System - Server Backend & API
Fix build errors
Bond_00971982c729725
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.csindex 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.csindex 14fd7eb3c1..67cceb4a8c 100644--- a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs+++ b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs@@ -178,7 +178,7 @@ namespace Jellyfin.Api.Controllersforeach (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.csindex 0f6d2aef77..671107c1ff 100644--- a/Jellyfin.Api/Helpers/HlsHelpers.cs+++ b/Jellyfin.Api/Helpers/HlsHelpers.cs@@ -46,7 +46,7 @@ namespace Jellyfin.Api.Helperswhile (!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.csindex 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.csindex 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);