mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 23:02:18 +01:00
Remove some unnecessary allocations
This commit is contained in:
@@ -26,19 +26,23 @@ namespace Emby.Server.Implementations
|
||||
webDirectoryPath)
|
||||
{
|
||||
InternalMetadataPath = DefaultInternalMetadataPath;
|
||||
// ProgramDataPath cannot change when the server is running, so cache these to avoid allocations.
|
||||
RootFolderPath = Path.Join(ProgramDataPath, "root");
|
||||
DefaultUserViewsPath = Path.Combine(RootFolderPath, "default");
|
||||
DefaultInternalMetadataPath = Path.Combine(ProgramDataPath, "metadata");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the base root media directory.
|
||||
/// </summary>
|
||||
/// <value>The root folder path.</value>
|
||||
public string RootFolderPath => Path.Combine(ProgramDataPath, "root");
|
||||
public string RootFolderPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the default user view directory. Used if no specific user view is defined.
|
||||
/// </summary>
|
||||
/// <value>The default user views path.</value>
|
||||
public string DefaultUserViewsPath => Path.Combine(RootFolderPath, "default");
|
||||
public string DefaultUserViewsPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the People directory.
|
||||
@@ -98,7 +102,7 @@ namespace Emby.Server.Implementations
|
||||
public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DefaultInternalMetadataPath => Path.Combine(ProgramDataPath, "metadata");
|
||||
public string DefaultInternalMetadataPath { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string InternalMetadataPath { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user