The Free Software Media System - Server Backend & API
Minor improvements
Bond_00951dd3f1e19c3
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.csindex 2adc1d6c34..660bbb2deb 100644--- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs+++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs@@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.AppBase}/// <inheritdoc />- public string VirtualDataPath { get; } = "%AppDataPath%";+ public string VirtualDataPath => "%AppDataPath%";/// <summary>/// Gets the image cache path.diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 0c8b0339bd..4110b6f3f7 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -259,8 +259,8 @@ namespace Emby.Server.ImplementationsIServiceCollection serviceCollection){_xmlSerializer = new MyXmlSerializer();- _jsonSerializer = new JsonSerializer();-+ _jsonSerializer = new JsonSerializer();+ServiceCollection = serviceCollection;_networkManager = networkManager;@@ -340,7 +340,7 @@ namespace Emby.Server.Implementations/// Gets the email address for use within a comment section of a user agent field./// Presently used to provide contact information to MusicBrainz service./// </summary>- public string ApplicationUserAgentAddress { get; } = "[email protected]";+ public string ApplicationUserAgentAddress => "[email protected]";/// <summary>/// Gets the current application name.@@ -404,7 +404,7 @@ namespace Emby.Server.Implementations/// <summary>/// Resolves this instance./// </summary>- /// <typeparam name="T">The type</typeparam>+ /// <typeparam name="T">The type.</typeparam>/// <returns>``0.</returns>public T Resolve<T>() => ServiceProvider.GetService<T>();@@ -1090,7 +1090,7 @@ namespace Emby.Server.Implementations{// No metafile, so lets see if the folder is versioned.metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1];-+int versionIndex = dir.LastIndexOf('_');if (versionIndex != -1 && Version.TryParse(dir.Substring(versionIndex + 1), out Version ver)){@@ -1099,9 +1099,9 @@ namespace Emby.Server.Implementations}else{- // Un-versioned folder - Add it under the path name and version 0.0.0.1.+ // Un-versioned folder - Add it under the path name and version 0.0.0.1.versions.Add((new Version(0, 0, 0, 1), metafile, dir));- }+ }}}catchdiff --git a/Emby.Server.Implementations/ServerApplicationPaths.cs b/Emby.Server.Implementations/ServerApplicationPaths.csindex dfdd4200e0..ac589b03cf 100644--- a/Emby.Server.Implementations/ServerApplicationPaths.cs+++ b/Emby.Server.Implementations/ServerApplicationPaths.cs@@ -104,6 +104,6 @@ namespace Emby.Server.Implementationspublic string InternalMetadataPath { get; set; }/// <inheritdoc />- public string VirtualInternalMetadataPath { get; } = "%MetadataPath%";+ public string VirtualInternalMetadataPath => "%MetadataPath%";}}