< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzArtistExternalUrlProvider
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistExternalUrlProvider.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 32
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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
get_Name()100%11100%

File(s)

/srv/git/jellyfin/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistExternalUrlProvider.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using MediaBrowser.Controller.Entities;
 3using MediaBrowser.Controller.Entities.Audio;
 4using MediaBrowser.Controller.Providers;
 5using MediaBrowser.Model.Entities;
 6
 7namespace MediaBrowser.Providers.Plugins.MusicBrainz;
 8
 9/// <summary>
 10/// External artist URLs for MusicBrainz.
 11/// </summary>
 12public class MusicBrainzArtistExternalUrlProvider : IExternalUrlProvider
 13{
 14    /// <inheritdoc/>
 2115    public string Name => "MusicBrainz Artist";
 16
 17    /// <inheritdoc/>
 18    public IEnumerable<string> GetExternalUrls(BaseItem item)
 19    {
 20        if (item.TryGetProviderId(MetadataProvider.MusicBrainzArtist, out var externalId))
 21        {
 22            switch (item)
 23            {
 24                case MusicAlbum:
 25                case Person:
 26                    yield return Plugin.Instance!.Configuration.Server + $"/artist/{externalId}";
 27
 28                    break;
 29            }
 30        }
 31    }
 32}

Methods/Properties

get_Name()