< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Music.ArtistMetadataService
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Music/ArtistMetadataService.cs
Line coverage
20%
Covered lines: 2
Uncovered lines: 8
Coverable lines: 10
Total lines: 43
Line coverage: 20%
Branch coverage
0%
Covered branches: 0
Total branches: 2
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_EnableUpdatingGenresFromChildren()100%210%
GetChildrenForMetadataUpdates(...)0%620%

File(s)

/srv/git/jellyfin/MediaBrowser.Providers/Music/ArtistMetadataService.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using System.Collections.Generic;
 4using System.Collections.Immutable;
 5using MediaBrowser.Controller.Configuration;
 6using MediaBrowser.Controller.Entities;
 7using MediaBrowser.Controller.Entities.Audio;
 8using MediaBrowser.Controller.Library;
 9using MediaBrowser.Controller.Providers;
 10using MediaBrowser.Model.IO;
 11using MediaBrowser.Providers.Manager;
 12using Microsoft.Extensions.Logging;
 13
 14namespace MediaBrowser.Providers.Music
 15{
 16    public class ArtistMetadataService : MetadataService<MusicArtist, ArtistInfo>
 17    {
 18        public ArtistMetadataService(
 19            IServerConfigurationManager serverConfigurationManager,
 20            ILogger<ArtistMetadataService> logger,
 21            IProviderManager providerManager,
 22            IFileSystem fileSystem,
 23            ILibraryManager libraryManager)
 2124            : base(serverConfigurationManager, logger, providerManager, fileSystem, libraryManager)
 25        {
 2126        }
 27
 28        /// <inheritdoc />
 029        protected override bool EnableUpdatingGenresFromChildren => true;
 30
 31        /// <inheritdoc />
 32        protected override IReadOnlyList<BaseItem> GetChildrenForMetadataUpdates(MusicArtist item)
 33        {
 034            return item.IsAccessedByName
 035                ? item.GetTaggedItems(new InternalItemsQuery
 036                {
 037                    Recursive = true,
 038                    IsFolder = false
 039                })
 040                : item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder);
 41        }
 42    }
 43}