using MediaBrowser.Model.Updates;
using MediaBrowser.Model.Weather;
using ProtoBuf;
using System;
namespace MediaBrowser.Model.Configuration
{
///
/// Represents the server configuration.
///
[ProtoContract]
public class ServerConfiguration : BaseApplicationConfiguration
{
///
/// Gets or sets a value indicating whether [enable internet providers].
///
/// true if [enable internet providers]; otherwise, false.
[ProtoMember(6)]
public bool EnableInternetProviders { get; set; }
///
/// Gets or sets the zip code to use when displaying weather
///
/// The weather location.
[ProtoMember(7)]
public string WeatherLocation { get; set; }
///
/// Gets or sets the weather unit to use when displaying weather
///
/// The weather unit.
[ProtoMember(8)]
public WeatherUnits WeatherUnit { get; set; }
///
/// Gets or sets the metadata refresh days.
///
/// The metadata refresh days.
[ProtoMember(9)]
public int MetadataRefreshDays { get; set; }
///
/// Gets or sets a value indicating whether [save local meta].
///
/// true if [save local meta]; otherwise, false.
[ProtoMember(10)]
public bool SaveLocalMeta { get; set; }
///
/// Gets or sets a value indicating whether [refresh item images].
///
/// true if [refresh item images]; otherwise, false.
[ProtoMember(11)]
public bool RefreshItemImages { get; set; }
///
/// Gets or sets the preferred metadata language.
///
/// The preferred metadata language.
[ProtoMember(12)]
public string PreferredMetadataLanguage { get; set; }
///
/// Gets or sets the metadata country code.
///
/// The metadata country code.
[ProtoMember(13)]
public string MetadataCountryCode { get; set; }
///
/// Gets or sets the size of the TMDB fetched poster.
///
/// The size of the TMDB fetched poster.
[ProtoMember(14)]
public string TmdbFetchedPosterSize { get; set; }
///
/// Gets or sets the size of the TMDB fetched profile.
///
/// The size of the TMDB fetched profile.
[ProtoMember(15)]
public string TmdbFetchedProfileSize { get; set; }
///
/// Gets or sets the size of the TMDB fetched backdrop.
///
/// The size of the TMDB fetched backdrop.
[ProtoMember(16)]
public string TmdbFetchedBackdropSize { get; set; }
///
/// Gets or sets the max backdrops.
///
/// The max backdrops.
[ProtoMember(17)]
public int MaxBackdrops { get; set; }
///
/// Gets or sets a value indicating whether [download movie art].
///
/// true if [download movie art]; otherwise, false.
[ProtoMember(40)]
public bool DownloadMovieArt { get; set; }
///
/// Gets or sets a value indicating whether [download movie logo].
///
/// true if [download movie logo]; otherwise, false.
[ProtoMember(41)]
public bool DownloadMovieLogo { get; set; }
///
/// Gets or sets a value indicating whether [download movie disc].
///
/// true if [download movie disc]; otherwise, false.
[ProtoMember(42)]
public bool DownloadMovieDisc { get; set; }
///
/// Gets or sets a value indicating whether [download TV art].
///
/// true if [download TV art]; otherwise, false.
[ProtoMember(43)]
public bool DownloadTVArt { get; set; }
///
/// Gets or sets a value indicating whether [download TV logo].
///
/// true if [download TV logo]; otherwise, false.
[ProtoMember(44)]
public bool DownloadTVLogo { get; set; }
///
/// Gets or sets a value indicating whether [download TV thumb].
///
/// true if [download TV thumb]; otherwise, false.
[ProtoMember(45)]
public bool DownloadTVThumb { get; set; }
///
/// Gets or sets a value indicating whether [download movie banner].
///
/// true if [download movie banner]; otherwise, false.
[ProtoMember(46)]
public bool DownloadMovieBanner { get; set; }
///
/// Gets or sets a value indicating whether [download movie thumb].
///
/// true if [download movie thumb]; otherwise, false.
[ProtoMember(47)]
public bool DownloadMovieThumb { get; set; }
///
/// Gets or sets a value indicating whether [download TV banner].
///
/// true if [download TV banner]; otherwise, false.
[ProtoMember(48)]
public bool DownloadTVBanner { get; set; }
///
/// Gets or sets a value indicating whether [download TV season banner].
///
/// true if [download TV season banner]; otherwise, false.
[ProtoMember(49)]
public bool DownloadTVSeasonBanner { get; set; }
///
/// Gets or sets a value indicating whether [download TV season thumb].
///
/// true if [download TV season thumb]; otherwise, false.
[ProtoMember(50)]
public bool DownloadTVSeasonThumb { get; set; }
///
/// Gets or sets a value indicating whether [download TV season backdrops].
///
/// true if [download TV season banner]; otherwise, false.
[ProtoMember(51)]
public bool DownloadTVSeasonBackdrops { get; set; }
///
/// Gets or sets a value indicating whether [download TV season backdrops].
///
/// true if [download TV season banner]; otherwise, false.
[ProtoMember(52)]
public bool DownloadHDFanArt { get; set; }
///
/// Gets or sets the name of the item repository that should be used
///
/// The item repository.
[ProtoMember(24)]
public string ItemRepository { get; set; }
///
/// Gets or sets the name of the user repository that should be used
///
/// The user repository.
[ProtoMember(25)]
public string UserRepository { get; set; }
///
/// Gets or sets the name of the user data repository that should be used
///
/// The user data repository.
[ProtoMember(26)]
public string UserDataRepository { get; set; }
///
/// Characters to be replaced with a ' ' in strings to create a sort name
///
/// The sort replace characters.
[ProtoMember(27)]
public string[] SortReplaceCharacters { get; set; }
///
/// Characters to be removed from strings to create a sort name
///
/// The sort remove characters.
[ProtoMember(28)]
public string[] SortRemoveCharacters { get; set; }
///
/// Words to be removed from strings to create a sort name
///
/// The sort remove words.
[ProtoMember(29)]
public string[] SortRemoveWords { get; set; }
///
/// Show an output log window for debugging
///
/// true if [show log window]; otherwise, false.
[ProtoMember(30)]
public bool ShowLogWindow { get; set; }
///
/// Gets or sets the name of the user data repository that should be used
///
/// The display preferences repository.
[ProtoMember(31)]
public string DisplayPreferencesRepository { get; set; }
///
/// The list of types that will NOT be allowed to have internet providers run against them even if they are turned on.
///
/// The internet provider exclude types.
[ProtoMember(32)]
public string[] InternetProviderExcludeTypes { get; set; }
///
/// Gets or sets the recent item days.
///
/// The recent item days.
[ProtoMember(34)]
public int RecentItemDays { get; set; }
///
/// Gets or sets the recently played days.
///
/// The recently played days.
[ProtoMember(35)]
public int RecentlyPlayedDays { get; set; }
///
/// Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.
///
/// The min resume PCT.
[ProtoMember(36)]
public int MinResumePct { get; set; }
///
/// Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
///
/// The max resume PCT.
[ProtoMember(37)]
public int MaxResumePct { get; set; }
///
/// Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..
///
/// The min resume duration seconds.
[ProtoMember(38)]
public int MinResumeDurationSeconds { get; set; }
///
/// The delay in seconds that we will wait after a file system change to try and discover what has been added/removed
/// Some delay is necessary with some items because their creation is not atomic. It involves the creation of several
/// different directories and files.
///
/// The file watcher delay.
[ProtoMember(55)]
public int FileWatcherDelay { get; set; }
///
/// Gets or sets a value indicating whether [enable developer tools].
///
/// true if [enable developer tools]; otherwise, false.
[ProtoMember(57)]
public bool EnableDeveloperTools { get; set; }
// Next Proto number ====> 61
///
/// Initializes a new instance of the class.
///
public ServerConfiguration()
: base()
{
#if (DEBUG)
EnableDeveloperTools = true;
#endif
MinResumePct = 5;
MaxResumePct = 90;
MinResumeDurationSeconds = Convert.ToInt32(TimeSpan.FromMinutes(5).TotalSeconds);
FileWatcherDelay = 8;
RecentItemDays = 14;
RecentlyPlayedDays = 14;
EnableInternetProviders = true; //initial installs will need these
InternetProviderExcludeTypes = new string[] { };
MetadataRefreshDays = 30;
PreferredMetadataLanguage = "en";
MetadataCountryCode = "US";
TmdbFetchedProfileSize = "w185"; //w185 w45 h632 or original
TmdbFetchedPosterSize = "w500"; //w500, w342, w185 or original
TmdbFetchedBackdropSize = "w1280"; //w1280, w780 or original
DownloadTVSeasonBanner = true;
DownloadTVBanner = true;
DownloadHDFanArt = true;
MaxBackdrops = 4;
SortReplaceCharacters = new [] { ".", "+", "%" };
SortRemoveCharacters = new [] { ",", "&", "-", "{", "}", "'" };
SortRemoveWords = new [] { "the", "a", "an" };
}
}
}