< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzReleaseGroupExternalUrlProvider
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzReleaseGroupExternalUrlProvider.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 28
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/MusicBrainzReleaseGroupExternalUrlProvider.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 release group URLs for MusicBrainz.
 11/// </summary>
 12public class MusicBrainzReleaseGroupExternalUrlProvider : IExternalUrlProvider
 13{
 14    /// <inheritdoc/>
 2115    public string Name => "MusicBrainz Release Group";
 16
 17    /// <inheritdoc/>
 18    public IEnumerable<string> GetExternalUrls(BaseItem item)
 19    {
 20        if (item is MusicAlbum)
 21        {
 22        if (item.TryGetProviderId(MetadataProvider.MusicBrainzReleaseGroup, out var externalId))
 23            {
 24                yield return Plugin.Instance!.Configuration.Server + $"/release-group/{externalId}";
 25            }
 26        }
 27    }
 28}

Methods/Properties

get_Name()