@ -26,10 +26,6 @@ namespace MediaBrowser.Server.Implementations
{
{
}
}
# endif
# endif
/// <summary>
/// The _root folder path
/// </summary>
private string _rootFolderPath ;
/// <summary>
/// <summary>
/// Gets the path to the base root media directory
/// Gets the path to the base root media directory
/// </summary>
/// </summary>
@ -38,22 +34,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _rootFolderPath = = null )
return Path . Combine ( ProgramDataPath , "root" ) ;
{
_rootFolderPath = Path . Combine ( ProgramDataPath , "Root" ) ;
if ( ! Directory . Exists ( _rootFolderPath ) )
{
Directory . CreateDirectory ( _rootFolderPath ) ;
}
}
return _rootFolderPath ;
}
}
}
}
/// <summary>
/// The _default user views path
/// </summary>
private string _defaultUserViewsPath ;
/// <summary>
/// <summary>
/// Gets the path to the default user view directory. Used if no specific user view is defined.
/// Gets the path to the default user view directory. Used if no specific user view is defined.
/// </summary>
/// </summary>
@ -62,22 +46,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _defaultUserViewsPath = = null )
return Path . Combine ( RootFolderPath , "default" ) ;
{
_defaultUserViewsPath = Path . Combine ( RootFolderPath , "Default" ) ;
if ( ! Directory . Exists ( _defaultUserViewsPath ) )
{
Directory . CreateDirectory ( _defaultUserViewsPath ) ;
}
}
return _defaultUserViewsPath ;
}
}
}
}
/// <summary>
/// The _localization path
/// </summary>
private string _localizationPath ;
/// <summary>
/// <summary>
/// Gets the path to localization data.
/// Gets the path to localization data.
/// </summary>
/// </summary>
@ -86,15 +58,7 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _localizationPath = = null )
return Path . Combine ( ProgramDataPath , "localization" ) ;
{
_localizationPath = Path . Combine ( ProgramDataPath , "Localization" ) ;
if ( ! Directory . Exists ( _localizationPath ) )
{
Directory . CreateDirectory ( _localizationPath ) ;
}
}
return _localizationPath ;
}
}
}
}
@ -110,36 +74,14 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _ibnPath = = null )
return _ibnPath ? ? ( _ibnPath = Path . Combine ( ProgramDataPath , "ImagesByName" ) ) ;
{
_ibnPath = Path . Combine ( ProgramDataPath , "ImagesByName" ) ;
if ( ! Directory . Exists ( _ibnPath ) )
{
Directory . CreateDirectory ( _ibnPath ) ;
}
}
return _ibnPath ;
}
}
set
set
{
{
_ibnPath = value ;
_ibnPath = value ;
_peoplePath = null ;
_studioPath = null ;
_genrePath = null ;
_yearPath = null ;
_musicArtistsPath = null ;
_generalPath = null ;
_ratingsPath = null ;
_mediaInfoImagesPath = null ;
}
}
}
}
/// <summary>
/// The _people path
/// </summary>
private string _peoplePath ;
/// <summary>
/// <summary>
/// Gets the path to the People directory
/// Gets the path to the People directory
/// </summary>
/// </summary>
@ -148,23 +90,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _peoplePath = = null )
return Path . Combine ( ItemsByNamePath , "People" ) ;
{
_peoplePath = Path . Combine ( ItemsByNamePath , "People" ) ;
if ( ! Directory . Exists ( _peoplePath ) )
{
Directory . CreateDirectory ( _peoplePath ) ;
}
}
}
}
return _peoplePath ;
}
}
/// <summary>
/// The _genre path
/// </summary>
private string _genrePath ;
/// <summary>
/// <summary>
/// Gets the path to the Genre directory
/// Gets the path to the Genre directory
/// </summary>
/// </summary>
@ -173,23 +102,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _genrePath = = null )
return Path . Combine ( ItemsByNamePath , "Genre" ) ;
{
_genrePath = Path . Combine ( ItemsByNamePath , "Genre" ) ;
if ( ! Directory . Exists ( _genrePath ) )
{
Directory . CreateDirectory ( _genrePath ) ;
}
}
return _genrePath ;
}
}
}
}
/// <summary>
/// The _studio path
/// </summary>
private string _studioPath ;
/// <summary>
/// <summary>
/// Gets the path to the Studio directory
/// Gets the path to the Studio directory
/// </summary>
/// </summary>
@ -198,23 +114,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _studioPath = = null )
return Path . Combine ( ItemsByNamePath , "Studio" ) ;
{
_studioPath = Path . Combine ( ItemsByNamePath , "Studio" ) ;
if ( ! Directory . Exists ( _studioPath ) )
{
Directory . CreateDirectory ( _studioPath ) ;
}
}
return _studioPath ;
}
}
}
}
/// <summary>
/// The _year path
/// </summary>
private string _yearPath ;
/// <summary>
/// <summary>
/// Gets the path to the Year directory
/// Gets the path to the Year directory
/// </summary>
/// </summary>
@ -223,23 +126,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _yearPath = = null )
return Path . Combine ( ItemsByNamePath , "Year" ) ;
{
_yearPath = Path . Combine ( ItemsByNamePath , "Year" ) ;
if ( ! Directory . Exists ( _yearPath ) )
{
Directory . CreateDirectory ( _yearPath ) ;
}
}
return _yearPath ;
}
}
}
}
/// <summary>
/// The _general path
/// </summary>
private string _generalPath ;
/// <summary>
/// <summary>
/// Gets the path to the General IBN directory
/// Gets the path to the General IBN directory
/// </summary>
/// </summary>
@ -248,23 +138,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _generalPath = = null )
return Path . Combine ( ItemsByNamePath , "general" ) ;
{
_generalPath = Path . Combine ( ItemsByNamePath , "General" ) ;
if ( ! Directory . Exists ( _generalPath ) )
{
Directory . CreateDirectory ( _generalPath ) ;
}
}
}
}
return _generalPath ;
}
}
/// <summary>
/// The _ratings path
/// </summary>
private string _ratingsPath ;
/// <summary>
/// <summary>
/// Gets the path to the Ratings IBN directory
/// Gets the path to the Ratings IBN directory
/// </summary>
/// </summary>
@ -273,23 +150,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _ratingsPath = = null )
return Path . Combine ( ItemsByNamePath , "ratings" ) ;
{
_ratingsPath = Path . Combine ( ItemsByNamePath , "Ratings" ) ;
if ( ! Directory . Exists ( _ratingsPath ) )
{
Directory . CreateDirectory ( _ratingsPath ) ;
}
}
return _ratingsPath ;
}
}
}
}
/// <summary>
/// The _media info images path
/// </summary>
private string _mediaInfoImagesPath ;
/// <summary>
/// <summary>
/// Gets the media info images path.
/// Gets the media info images path.
/// </summary>
/// </summary>
@ -298,23 +162,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _mediaInfoImagesPath = = null )
return Path . Combine ( ItemsByNamePath , "mediainfo" ) ;
{
_mediaInfoImagesPath = Path . Combine ( ItemsByNamePath , "MediaInfo" ) ;
if ( ! Directory . Exists ( _mediaInfoImagesPath ) )
{
Directory . CreateDirectory ( _mediaInfoImagesPath ) ;
}
}
}
}
return _mediaInfoImagesPath ;
}
}
/// <summary>
/// The _user configuration directory path
/// </summary>
private string _userConfigurationDirectoryPath ;
/// <summary>
/// <summary>
/// Gets the path to the user configuration directory
/// Gets the path to the user configuration directory
/// </summary>
/// </summary>
@ -323,22 +174,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _userConfigurationDirectoryPath = = null )
return Path . Combine ( ConfigurationDirectoryPath , "users" ) ;
{
_userConfigurationDirectoryPath = Path . Combine ( ConfigurationDirectoryPath , "users" ) ;
if ( ! Directory . Exists ( _userConfigurationDirectoryPath ) )
{
Directory . CreateDirectory ( _userConfigurationDirectoryPath ) ;
}
}
return _userConfigurationDirectoryPath ;
}
}
}
}
/// <summary>
/// The _f F MPEG stream cache path
/// </summary>
private string _fFMpegStreamCachePath ;
/// <summary>
/// <summary>
/// Gets the FF MPEG stream cache path.
/// Gets the FF MPEG stream cache path.
/// </summary>
/// </summary>
@ -347,24 +186,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _fFMpegStreamCachePath = = null )
return Path . Combine ( CachePath , "encoded-media" ) ;
{
_fFMpegStreamCachePath = Path . Combine ( CachePath , "encoded-media" ) ;
if ( ! Directory . Exists ( _fFMpegStreamCachePath ) )
{
Directory . CreateDirectory ( _fFMpegStreamCachePath ) ;
}
}
return _fFMpegStreamCachePath ;
}
}
}
}
/// <summary>
/// The _images data path
/// </summary>
private string _downloadedImagesDataPath ;
/// <summary>
/// <summary>
/// Gets the images data path.
/// Gets the images data path.
/// </summary>
/// </summary>
@ -373,24 +198,10 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _downloadedImagesDataPath = = null )
return Path . Combine ( DataPath , "remote-images" ) ;
{
_downloadedImagesDataPath = Path . Combine ( DataPath , "remote-images" ) ;
if ( ! Directory . Exists ( _downloadedImagesDataPath ) )
{
Directory . CreateDirectory ( _downloadedImagesDataPath ) ;
}
}
return _downloadedImagesDataPath ;
}
}
}
}
/// <summary>
/// The _music artists path
/// </summary>
private string _musicArtistsPath ;
/// <summary>
/// <summary>
/// Gets the artists path.
/// Gets the artists path.
/// </summary>
/// </summary>
@ -399,16 +210,7 @@ namespace MediaBrowser.Server.Implementations
{
{
get
get
{
{
if ( _musicArtistsPath = = null )
return Path . Combine ( ItemsByNamePath , "artists" ) ;
{
_musicArtistsPath = Path . Combine ( ItemsByNamePath , "Artists" ) ;
if ( ! Directory . Exists ( _musicArtistsPath ) )
{
Directory . CreateDirectory ( _musicArtistsPath ) ;
}
}
return _musicArtistsPath ;
}
}
}
}
}
}