Refactors the track slice across the stack

This commit is contained in:
BinaryAlley committed 2026-09-25 13:19:28 -07:00
1 parent e842c7baaf
commit 6bd0cf6d42
37 files changed
+853 -403

No files matched your search

@@ -190,16 +190,6 @@ public class TrackEntity : IStorageEntity, IAuditableEntity
/// </summary>
public AlbumEntity? Album { get; set; }
/// <summary>
/// Gets or sets the list of ratings for this track.
/// </summary>
public List<AudioRatingEntity> Ratings { get; set; } = [];
/// <summary>
/// Gets or sets the list of the media contributors of the track.
/// </summary>
public List<TrackContributorEntity> Contributors { get; set; } = [];
/// <summary>
/// Gets or sets the list of moods of the track.
/// </summary>
@@ -210,6 +200,16 @@ public class TrackEntity : IStorageEntity, IAuditableEntity
/// </summary>
public List<TrackIsrcEntity> Isrcs { get; set; } = [];
/// <summary>
/// Gets or sets the list of the media contributors of the track.
/// </summary>
public List<TrackContributorEntity> Contributors { get; set; } = [];
/// <summary>
/// Gets or sets the list of ratings for this track.
/// </summary>
public List<AudioRatingEntity> Ratings { get; set; } = [];
/// <summary>
/// Gets or sets the genres of the track.
/// </summary>
@@ -21,6 +21,15 @@ public interface ITrackRepository : IRepository<TrackEntity>,
IUpdateRepositoryAction<TrackEntity>,
IGetByIdRepositoryAction<TrackEntity, Guid>
{
/// <summary>
/// Gets the subset of <paramref name="paths"/> that is already used by a track of the library identified by <paramref name="libraryId"/>.
/// </summary>
/// <param name="libraryId">The Id of the library whose tracks are searched.</param>
/// <param name="paths">The track paths to check.</param>
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either the paths that are already used, or an error.</returns>
Task<Result<IReadOnlyCollection<string>>> GetExistingPathsAsync(Guid libraryId, IReadOnlyCollection<string> paths, CancellationToken cancellationToken);
/// <summary>
/// Gets all the tracks of the album identified by <paramref name="albumId"/>.
/// </summary>