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 { #if (DEBUG) /// /// Initializes a new instance of the class. /// public ServerApplicationPaths() : base(true) { } #else /// /// Initializes a new instance of the class. /// public ServerApplicationPaths() : base(false) { } #endif /// /// Initializes a new instance of the class. /// /// The program data path. public ServerApplicationPaths(string programDataPath) : base(programDataPath) { } /// /// 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"); } } /// /// Gets the FF MPEG stream cache path. /// /// The FF MPEG stream cache path. public string EncodedMediaCachePath { get { return Path.Combine(CachePath, "encoded-media"); } } /// /// Gets the images data path. /// /// The images data path. public string DownloadedImagesDataPath { get { return Path.Combine(DataPath, "remote-images"); } } /// /// Gets the artists path. /// /// The artists path. public string ArtistsPath { get { return Path.Combine(ItemsByNamePath, "artists"); } } /// /// Gets the game genre path. /// /// The game genre path. public string GameGenrePath { get { return Path.Combine(ItemsByNamePath, "GameGenre"); } } } }