using MediaBrowser.Model.Plugins; namespace MediaBrowser.Providers.Plugins.MusicBrainz.Configuration; /// /// MusicBrainz plugin configuration. /// public class PluginConfiguration : BasePluginConfiguration { /// /// The default server URL. /// public const string DefaultServer = "https://musicbrainz.org"; /// /// The default rate limit. /// public const double DefaultRateLimit = 1.0; private string _server = DefaultServer; private double _rateLimit = DefaultRateLimit; /// /// Gets or sets the server URL. /// public string Server { get => _server; set => _server = value.TrimEnd('/'); } /// /// Gets or sets the rate limit. /// public double RateLimit { get => _rateLimit; set { if (value < DefaultRateLimit && _server == DefaultServer) { _rateLimit = DefaultRateLimit; } else { _rateLimit = value; } } } /// /// Gets or sets a value indicating whether to replace the artist name. /// public bool ReplaceArtistName { get; set; } }