mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-09-29 15:31:04 -04:00
Fix build errors
This commit is contained in:
parent
236dd650d0
commit
71982c7297
@ -11,7 +11,7 @@ namespace Emby.Server.Implementations
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a new copy of the default configuration options.
|
/// Gets a new copy of the default configuration options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Dictionary<string, string> DefaultConfiguration => new Dictionary<string, string>
|
public static Dictionary<string, string?> DefaultConfiguration => new Dictionary<string, string?>
|
||||||
{
|
{
|
||||||
{ HostWebClientKey, bool.TrueString },
|
{ HostWebClientKey, bool.TrueString },
|
||||||
{ DefaultRedirectKey, "web/index.html" },
|
{ 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)))
|
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))
|
if (!Enum.TryParse<HomeSectionType>(displayPreferences.CustomPrefs[key], true, out var type))
|
||||||
{
|
{
|
||||||
type = order < 8 ? defaults[order] : HomeSectionType.None;
|
type = order < 8 ? defaults[order] : HomeSectionType.None;
|
||||||
|
@ -46,7 +46,7 @@ namespace Jellyfin.Api.Helpers
|
|||||||
|
|
||||||
while (!reader.EndOfStream)
|
while (!reader.EndOfStream)
|
||||||
{
|
{
|
||||||
var line = await reader.ReadLineAsync().ConfigureAwait(false);
|
var line = await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false);
|
||||||
if (line is null)
|
if (line is null)
|
||||||
{
|
{
|
||||||
// Nothing currently in buffer.
|
// 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.
|
/// Gets the command line options as a dictionary that can be used in the .NET configuration system.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The configuration dictionary.</returns>
|
/// <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)
|
if (NoWebClient)
|
||||||
{
|
{
|
||||||
|
@ -179,7 +179,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
_logger.LogDebug("charset {CharSet} detected for {Path}", result.EncodingName, fileInfo.Path);
|
_logger.LogDebug("charset {CharSet} detected for {Path}", result.EncodingName, fileInfo.Path);
|
||||||
|
|
||||||
using var reader = new StreamReader(stream, result.Encoding);
|
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));
|
return new MemoryStream(Encoding.UTF8.GetBytes(text));
|
||||||
}
|
}
|
||||||
@ -650,7 +650,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
{
|
{
|
||||||
encoding = reader.CurrentEncoding;
|
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);
|
var newText = text.Replace(",Arial,", ",Arial Unicode MS,", StringComparison.Ordinal);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user