< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Plugins.AudioDb.AudioDbAlbumExternalUrlProvider
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumExternalUrlProvider.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 31
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/AudioDb/AudioDbAlbumExternalUrlProvider.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.AudioDb;
 8
 9/// <summary>
 10/// External artist URLs for AudioDb.
 11/// </summary>
 12public class AudioDbAlbumExternalUrlProvider : IExternalUrlProvider
 13{
 14    /// <inheritdoc/>
 2115    public string Name => "TheAudioDb Album";
 16
 17    /// <inheritdoc/>
 18    public IEnumerable<string> GetExternalUrls(BaseItem item)
 19    {
 20        if (item.TryGetProviderId(MetadataProvider.AudioDbAlbum, out var externalId))
 21        {
 22            var baseUrl = "https://www.theaudiodb.com/";
 23            switch (item)
 24            {
 25                case MusicAlbum:
 26                    yield return baseUrl + $"album/{externalId}";
 27                    break;
 28            }
 29        }
 30    }
 31}

Methods/Properties

get_Name()