|
@@ -43,9 +43,9 @@ using Emby.Server.Implementations.Security;
|
|
|
using Emby.Server.Implementations.Serialization;
|
|
|
using Emby.Server.Implementations.Services;
|
|
|
using Emby.Server.Implementations.Session;
|
|
|
+using Emby.Server.Implementations.SyncPlay;
|
|
|
using Emby.Server.Implementations.TV;
|
|
|
using Emby.Server.Implementations.Updates;
|
|
|
-using Emby.Server.Implementations.SyncPlay;
|
|
|
using MediaBrowser.Api;
|
|
|
using MediaBrowser.Common;
|
|
|
using MediaBrowser.Common.Configuration;
|
|
@@ -78,8 +78,8 @@ using MediaBrowser.Controller.Security;
|
|
|
using MediaBrowser.Controller.Session;
|
|
|
using MediaBrowser.Controller.Sorting;
|
|
|
using MediaBrowser.Controller.Subtitles;
|
|
|
-using MediaBrowser.Controller.TV;
|
|
|
using MediaBrowser.Controller.SyncPlay;
|
|
|
+using MediaBrowser.Controller.TV;
|
|
|
using MediaBrowser.LocalMetadata.Savers;
|
|
|
using MediaBrowser.MediaEncoding.BdInfo;
|
|
|
using MediaBrowser.Model.Configuration;
|
|
@@ -484,12 +484,10 @@ namespace Emby.Server.Implementations
|
|
|
|
|
|
foreach (var plugin in Plugins)
|
|
|
{
|
|
|
- pluginBuilder.AppendLine(
|
|
|
- string.Format(
|
|
|
- CultureInfo.InvariantCulture,
|
|
|
- "{0} {1}",
|
|
|
- plugin.Name,
|
|
|
- plugin.Version));
|
|
|
+ pluginBuilder.Append(plugin.Name)
|
|
|
+ .Append(' ')
|
|
|
+ .Append(plugin.Version)
|
|
|
+ .AppendLine();
|
|
|
}
|
|
|
|
|
|
Logger.LogInformation("Plugins: {Plugins}", pluginBuilder.ToString());
|
|
@@ -1153,7 +1151,7 @@ namespace Emby.Server.Implementations
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- return GetLocalApiUrl(addresses.First());
|
|
|
+ return GetLocalApiUrl(addresses[0]);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -1226,7 +1224,7 @@ namespace Emby.Server.Implementations
|
|
|
var addresses = ServerConfigurationManager
|
|
|
.Configuration
|
|
|
.LocalNetworkAddresses
|
|
|
- .Select(NormalizeConfiguredLocalAddress)
|
|
|
+ .Select(x => NormalizeConfiguredLocalAddress(x))
|
|
|
.Where(i => i != null)
|
|
|
.ToList();
|
|
|
|
|
@@ -1247,8 +1245,7 @@ namespace Emby.Server.Implementations
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- var valid = await IsLocalIpAddressValidAsync(address, cancellationToken).ConfigureAwait(false);
|
|
|
- if (valid)
|
|
|
+ if (await IsLocalIpAddressValidAsync(address, cancellationToken).ConfigureAwait(false))
|
|
|
{
|
|
|
resultList.Add(address);
|
|
|
|
|
@@ -1262,13 +1259,12 @@ namespace Emby.Server.Implementations
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
- public IPAddress NormalizeConfiguredLocalAddress(string address)
|
|
|
+ public IPAddress NormalizeConfiguredLocalAddress(ReadOnlySpan<char> address)
|
|
|
{
|
|
|
var index = address.Trim('/').IndexOf('/');
|
|
|
-
|
|
|
if (index != -1)
|
|
|
{
|
|
|
- address = address.Substring(index + 1);
|
|
|
+ address = address.Slice(index + 1);
|
|
|
}
|
|
|
|
|
|
if (IPAddress.TryParse(address.Trim('/'), out IPAddress result))
|