|
@@ -4,7 +4,6 @@ using System.Globalization;
|
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Net;
|
|
|
-using System.Net.Security;
|
|
|
using System.Reflection;
|
|
|
using System.Runtime.InteropServices;
|
|
|
using System.Text;
|
|
@@ -238,7 +237,7 @@ namespace Jellyfin.Server
|
|
|
{
|
|
|
foreach (var address in addresses)
|
|
|
{
|
|
|
- _logger.LogInformation("Kestrel listening on {ipaddr}", address);
|
|
|
+ _logger.LogInformation("Kestrel listening on {IpAddress}", address);
|
|
|
options.Listen(address, appHost.HttpPort);
|
|
|
|
|
|
if (appHost.EnableHttps && appHost.Certificate != null)
|
|
@@ -443,20 +442,18 @@ namespace Jellyfin.Server
|
|
|
if (!File.Exists(configPath))
|
|
|
{
|
|
|
// For some reason the csproj name is used instead of the assembly name
|
|
|
- using (Stream? resource = typeof(Program).Assembly.GetManifestResourceStream(ResourcePath))
|
|
|
+ await using Stream? resource = typeof(Program).Assembly.GetManifestResourceStream(ResourcePath);
|
|
|
+ if (resource == null)
|
|
|
{
|
|
|
- if (resource == null)
|
|
|
- {
|
|
|
- throw new InvalidOperationException(
|
|
|
- string.Format(
|
|
|
- CultureInfo.InvariantCulture,
|
|
|
- "Invalid resource path: '{0}'",
|
|
|
- ResourcePath));
|
|
|
- }
|
|
|
-
|
|
|
- using Stream dst = File.Open(configPath, FileMode.CreateNew);
|
|
|
- await resource.CopyToAsync(dst).ConfigureAwait(false);
|
|
|
+ throw new InvalidOperationException(
|
|
|
+ string.Format(
|
|
|
+ CultureInfo.InvariantCulture,
|
|
|
+ "Invalid resource path: '{0}'",
|
|
|
+ ResourcePath));
|
|
|
}
|
|
|
+
|
|
|
+ await using Stream dst = File.Open(configPath, FileMode.CreateNew);
|
|
|
+ await resource.CopyToAsync(dst).ConfigureAwait(false);
|
|
|
}
|
|
|
|
|
|
return new ConfigurationBuilder()
|