using MediaBrowser.Common.Implementations;
using MediaBrowser.Controller;
using System.IO;
namespace MediaBrowser.Server.Implementations
{
///
/// Extends BaseApplicationPaths to add paths that are only applicable on the server
///
public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths
{
///
/// Initializes a new instance of the class.
///
public ServerApplicationPaths(string programDataPath, string applicationPath, string applicationResourcesPath)
: base(programDataPath, applicationPath)
{
ApplicationResourcesPath = applicationResourcesPath;
}
public string ApplicationResourcesPath { get; private set; }
///
/// Gets the path to the base root media directory
///
/// The root folder path.
public string RootFolderPath
{
get
{
return 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
{
get
{
return Path.Combine(RootFolderPath, "default");
}
}
///
/// Gets the path to localization data.
///
/// The localization path.
public string LocalizationPath
{
get
{
return Path.Combine(ProgramDataPath, "localization");
}
}
///
/// The _ibn path
///
private string _ibnPath;
///
/// Gets the path to the Images By Name directory
///
/// The images by name path.
public string ItemsByNamePath
{
get
{
return _ibnPath ?? (_ibnPath = Path.Combine(ProgramDataPath, "ImagesByName"));
}
set
{
_ibnPath = value;
}
}
///
/// Gets the path to the People directory
///
/// The people path.
public string PeoplePath
{
get
{
return Path.Combine(ItemsByNamePath, "People");
}
}
///
/// Gets the path to the Genre directory
///
/// The genre path.
public string GenrePath
{
get
{
return Path.Combine(ItemsByNamePath, "Genre");
}
}
///
/// Gets the path to the Genre directory
///
/// The genre path.
public string MusicGenrePath
{
get
{
return Path.Combine(ItemsByNamePath, "MusicGenre");
}
}
///
/// Gets the path to the Studio directory
///
/// The studio path.
public string StudioPath
{
get
{
return Path.Combine(ItemsByNamePath, "Studio");
}
}
///
/// Gets the path to the Year directory
///
/// The year path.
public string YearPath
{
get
{
return Path.Combine(ItemsByNamePath, "Year");
}
}
///
/// Gets the path to the General IBN directory
///
/// The general path.
public string GeneralPath
{
get
{
return Path.Combine(ItemsByNamePath, "general");
}
}
///
/// Gets the path to the Ratings IBN directory
///
/// The ratings path.
public string RatingsPath
{
get
{
return Path.Combine(ItemsByNamePath, "ratings");
}
}
///
/// Gets the media info images path.
///
/// The media info images path.
public string MediaInfoImagesPath
{
get
{
return Path.Combine(ItemsByNamePath, "mediainfo");
}
}
///
/// Gets the path to the user configuration directory
///
/// The user configuration directory path.
public string UserConfigurationDirectoryPath
{
get
{
return Path.Combine(ConfigurationDirectoryPath, "users");
}
}
private string _transcodingTempPath;
public string TranscodingTempPath
{
get
{
return _transcodingTempPath ?? (_transcodingTempPath = Path.Combine(ProgramDataPath, "transcoding-temp"));
}
set
{
_transcodingTempPath = value;
}
}
///
/// Gets the game genre path.
///
/// The game genre path.
public string GameGenrePath
{
get
{
return Path.Combine(ItemsByNamePath, "GameGenre");
}
}
private string _internalMetadataPath;
public string InternalMetadataPath
{
get
{
return _internalMetadataPath ?? (_internalMetadataPath = Path.Combine(DataPath, "metadata"));
}
set
{
_internalMetadataPath = value;
}
}
}
}