< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Plugins.MusicBrainz.Configuration.PluginConfiguration
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs
Line coverage
44%
Covered lines: 4
Uncovered lines: 5
Coverable lines: 9
Total lines: 57
Line coverage: 44.4%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
get_Server()100%11100%
set_Server(...)100%210%
get_RateLimit()100%11100%
set_RateLimit(...)0%2040%

File(s)

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

#LineLine coverage
 1using MediaBrowser.Model.Plugins;
 2
 3namespace MediaBrowser.Providers.Plugins.MusicBrainz.Configuration;
 4
 5/// <summary>
 6/// MusicBrainz plugin configuration.
 7/// </summary>
 8public class PluginConfiguration : BasePluginConfiguration
 9{
 10    /// <summary>
 11    /// The default server URL.
 12    /// </summary>
 13    public const string DefaultServer = "https://musicbrainz.org";
 14
 15    /// <summary>
 16    /// The default rate limit.
 17    /// </summary>
 18    public const double DefaultRateLimit = 1.0;
 19
 2220    private string _server = DefaultServer;
 21
 2222    private double _rateLimit = DefaultRateLimit;
 23
 24    /// <summary>
 25    /// Gets or sets the server URL.
 26    /// </summary>
 27    public string Server
 28    {
 8829        get => _server;
 30
 031        set => _server = value.TrimEnd('/');
 32    }
 33
 34    /// <summary>
 35    /// Gets or sets the rate limit.
 36    /// </summary>
 37    public double RateLimit
 38    {
 8839        get => _rateLimit;
 40        set
 41        {
 042            if (value < DefaultRateLimit && _server == DefaultServer)
 43            {
 044                _rateLimit = DefaultRateLimit;
 45            }
 46            else
 47            {
 048                _rateLimit = value;
 49            }
 050        }
 51    }
 52
 53    /// <summary>
 54    /// Gets or sets a value indicating whether to replace the artist name.
 55    /// </summary>
 56    public bool ReplaceArtistName { get; set; }
 57}