Fix build errors

pull/8547/head
Bond_009 2 years ago
parent 236dd650d0
commit 71982c7297

@ -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" },

@ -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;

@ -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.

@ -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)
{

@ -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);

Loading…
Cancel
Save