// Copyright (c) Arlo Godfrey. All Rights Reserved. // Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms. // See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information. using System; using System.Threading; using System.Threading.Tasks; using OwlCore.Provisos; using StrixMusic.Sdk.FileMetadata.Repositories; namespace StrixMusic.Sdk.FileMetadata { /// /// Given an implementation of OwlCore.AbstractStorage, this manages scanning and caching all the music metadata from files in folder, including child folders. /// public interface IFileMetadataManager : IAsyncInit, IAsyncDisposable { /// /// Stores album metadata. /// IAlbumRepository Albums { get; } /// /// Stores artist metadata. /// IArtistRepository Artists { get; } /// /// Stores playlist metadata. /// IPlaylistRepository Playlists { get; } /// /// Stores track metadata. /// ITrackRepository Tracks { get; } /// /// Stores image metadata. /// IImageRepository Images { get; } /// /// If true, the repositories will not be initialized when InitAsync is called for this . /// bool SkipRepoInit { get; set; } /// /// Gets or sets the type of metadata scan that should be used. /// MetadataScanTypes ScanTypes { get; set; } /// /// The number of files that are scanned concurrently. /// int DegreesOfParallelism { get; set; } /// /// Starts scanning the given folder. /// /// A that represents the asynchronous operation. Task ScanAsync(CancellationToken cancellationToken = default); /// /// Raised when metadata scanning has started. /// event EventHandler? ScanningStarted; /// /// Raised when metadata scanning has completed. /// event EventHandler? ScanningCompleted; } }