jellyfin/MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs

49 lines
1.0 KiB
C#
Raw Normal View History

#pragma warning disable CS1591
using MediaBrowser.Model.Plugins;
2020-02-21 23:04:52 -07:00
namespace MediaBrowser.Providers.Plugins.MusicBrainz
{
public class PluginConfiguration : BasePluginConfiguration
{
2020-03-01 06:48:41 -07:00
private string _server = Plugin.DefaultServer;
2020-02-21 23:04:52 -07:00
2020-03-01 06:48:41 -07:00
private long _rateLimit = Plugin.DefaultRateLimit;
2020-02-27 09:43:57 -07:00
public string Server
{
get
{
2020-02-29 00:22:45 -07:00
return _server;
2020-02-27 09:43:57 -07:00
}
set
{
2020-02-29 00:22:45 -07:00
_server = value.TrimEnd('/');
2020-02-27 09:43:57 -07:00
}
}
public long RateLimit
{
get
{
2020-02-29 00:22:45 -07:00
return _rateLimit;
2020-02-27 09:43:57 -07:00
}
set
{
2020-03-01 06:48:41 -07:00
if (value < Plugin.DefaultRateLimit && _server == Plugin.DefaultServer)
2020-02-27 09:43:57 -07:00
{
2020-03-30 13:16:32 -07:00
_rateLimit = Plugin.DefaultRateLimit;
}
else
{
_rateLimit = value;
2020-02-27 09:43:57 -07:00
}
}
}
2020-02-23 08:24:03 -07:00
public bool ReplaceArtistName { get; set; }
2020-02-21 23:04:52 -07:00
}
}