using System.IO;
using Emby.Server.Implementations.AppBase;
using MediaBrowser.Controller;
namespace Emby.Server.Implementations
{
///
/// Extends BaseApplicationPaths to add paths that are only applicable on the server.
///
public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths
{
private string _internalMetadataPath;
///
/// Initializes a new instance of the class.
///
public ServerApplicationPaths(
string programDataPath,
string logDirectoryPath,
string configurationDirectoryPath,
string cacheDirectoryPath,
string webDirectoryPath)
: base(
programDataPath,
logDirectoryPath,
configurationDirectoryPath,
cacheDirectoryPath,
webDirectoryPath)
{
}
///
/// Gets the path to the base root media directory.
///
/// The root folder path.
public string RootFolderPath => Path.Combine(ProgramDataPath, "root");
///
/// Gets the path to the default user view directory. Used if no specific user view is defined.
///
/// The default user views path.
public string DefaultUserViewsPath => Path.Combine(RootFolderPath, "default");
///
/// Gets the path to the People directory.
///
/// The people path.
public string PeoplePath => Path.Combine(InternalMetadataPath, "People");
///
public string ArtistsPath => Path.Combine(InternalMetadataPath, "artists");
///
/// Gets the path to the Genre directory.
///
/// The genre path.
public string GenrePath => Path.Combine(InternalMetadataPath, "Genre");
///
/// Gets the path to the Genre directory.
///
/// The genre path.
public string MusicGenrePath => Path.Combine(InternalMetadataPath, "MusicGenre");
///
/// Gets the path to the Studio directory.
///
/// The studio path.
public string StudioPath => Path.Combine(InternalMetadataPath, "Studio");
///
/// Gets the path to the Year directory.
///
/// The year path.
public string YearPath => Path.Combine(InternalMetadataPath, "Year");
///
/// Gets the path to the General IBN directory.
///
/// The general path.
public string GeneralPath => Path.Combine(InternalMetadataPath, "general");
///
/// Gets the path to the Ratings IBN directory.
///
/// The ratings path.
public string RatingsPath => Path.Combine(InternalMetadataPath, "ratings");
///
/// Gets the media info images path.
///
/// The media info images path.
public string MediaInfoImagesPath => Path.Combine(InternalMetadataPath, "mediainfo");
///
/// Gets the path to the user configuration directory.
///
/// The user configuration directory path.
public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users");
///
public string InternalMetadataPath
{
get => _internalMetadataPath ?? (_internalMetadataPath = Path.Combine(DataPath, "metadata"));
set => _internalMetadataPath = value;
}
///
public string VirtualInternalMetadataPath { get; } = "%MetadataPath%";
}
}