2020-02-27 09:43:57 -07:00
|
|
|
|
using MediaBrowser.Model.Plugins;
|
2020-02-21 23:04:52 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Providers.Plugins.MusicBrainz
|
|
|
|
|
{
|
|
|
|
|
public class PluginConfiguration : BasePluginConfiguration
|
|
|
|
|
{
|
2020-02-29 00:22:45 -07:00
|
|
|
|
private string _server = Plugin.Instance.DefaultServer;
|
2020-02-21 23:04:52 -07:00
|
|
|
|
|
2020-02-29 00:22:45 -07:00
|
|
|
|
private long _rateLimit = Plugin.Instance.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-02-29 00:22:45 -07:00
|
|
|
|
if (value < 2000u && _server == Plugin.Instance.DefaultServer)
|
2020-02-27 09:43:57 -07:00
|
|
|
|
{
|
|
|
|
|
RateLimit = Plugin.Instance.DefaultRateLimit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-02-23 08:24:03 -07:00
|
|
|
|
|
|
|
|
|
public bool Enable { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool ReplaceArtistName { get; set; }
|
2020-02-21 23:04:52 -07:00
|
|
|
|
}
|
|
|
|
|
}
|