#region ========================================================================= USING ===================================================================================== using Lumina.Contracts.DTO.Common; using Lumina.Contracts.DTO.MediaLibrary.AudioLibrary.MusicLibrary; using Lumina.Domain.SharedKernel.Common.Enums.MediaLibrary; using Lumina.Plugins.Contracts.Core.Metadata; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; #endregion namespace Lumina.Plugins.LocalMusicArtwork.Core; /// /// Provides the artwork of an artist from the images stored in the folders of the local music library of the user. /// internal sealed class LocalMusicArtistArtworkProvider : IArtworkProvider { /// /// Gets the display name of the artwork provider. /// public string Name => "Local Music Artwork"; /// /// Gets the media library types this artwork provider supports. /// public IReadOnlyList SupportedLibraryTypes => [LibraryType.Music]; /// /// Gets a value indicating whether this artwork provider requires access to the web to retrieve artwork. /// public bool RequiresWebAccess => false; /// /// Gets the artworks of the artist described by . /// /// The lookup describing the artist to get the artwork for. /// Cancellation token that can be used to stop the execution. /// The artworks of the artist, or an empty collection when no artwork was found. public Task> GetArtworkAsync(ArtistMetadataLookupDto lookup, CancellationToken cancellationToken) { return Task.FromResult(LocalMusicArtworkScanner.ScanArtistArtwork(lookup.Path)); } }