Adds the media consumption history, statistics, resume, and deletion queries

This commit is contained in:
BinaryAlley committed 2026-10-24 18:48:48 +03:00
1 parent bde7ee4b1f
commit f777af07cf
61 files changed
+2833 -35

No files matched your search

@@ -124,6 +124,15 @@ public interface IBookRepository : IRepository<BookEntity>,
/// <returns>An <see cref="Result{TValue}"/> containing either the display names of the authors of the books, keyed by book Id, or an error.</returns>
Task<Result<IReadOnlyDictionary<Guid, string?>>> GetAuthorsDisplayNamesByBookIdsAsync(IReadOnlyCollection<Guid> bookIds, CancellationToken cancellationToken);
/// <summary>
/// Gets the books identified by <paramref name="bookIds"/>, optionally together with their navigation properties.
/// </summary>
/// <param name="bookIds">The Ids of the books to get.</param>
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the books should be loaded together with the books themselves.</param>
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either the existing books, or an error.</returns>
Task<Result<IReadOnlyList<BookEntity>>> GetByIdsAsync(IReadOnlyCollection<Guid> bookIds, bool shouldIncludeNavigationProperties, CancellationToken cancellationToken);
/// <summary>
/// Deletes all the books of the media library identified by <paramref name="libraryId"/>, together with their artwork and their related data.
/// </summary>
@@ -27,6 +27,15 @@ public interface IMusicArtworkRepository : IRepository<MusicArtworkEntity>,
/// <returns>An <see cref="Result{TValue}"/> containing either a collection of <see cref="MusicArtworkEntity"/>, or an error.</returns>
Task<Result<IReadOnlyList<MusicArtworkEntity>>> GetByOwnerAsync(MusicArtworkOwnerType ownerType, Guid ownerId, CancellationToken cancellationToken);
/// <summary>
/// Gets the pieces of artwork owned by the music library items of the provided <paramref name="ownerType"/> identified by any of <paramref name="ownerIds"/>.
/// </summary>
/// <param name="ownerType">The type of the music library items that own the artwork.</param>
/// <param name="ownerIds">The Ids of the music library items that own the artwork.</param>
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either the artwork of the existing owners, or an error.</returns>
Task<Result<IReadOnlyList<MusicArtworkEntity>>> GetByOwnersAsync(MusicArtworkOwnerType ownerType, IReadOnlyCollection<Guid> ownerIds, CancellationToken cancellationToken);
/// <summary>
/// Deletes all the pieces of artwork owned by the music library item of the provided <paramref name="ownerType"/> identified by <paramref name="ownerId"/>.
/// </summary>
@@ -137,4 +137,13 @@ public interface ITrackRepository : IRepository<TrackEntity>,
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either the access summary of the existing tracks, or an error.</returns>
Task<Result<TrackAccessSummaryDto>> GetAccessInfoByIdsAsync(IReadOnlyCollection<Guid> trackIds, CancellationToken cancellationToken);
/// <summary>
/// Gets the tracks identified by <paramref name="trackIds"/>, optionally together with their navigation properties.
/// </summary>
/// <param name="trackIds">The Ids of the tracks to get.</param>
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the tracks should be loaded together with the tracks themselves.</param>
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either the existing tracks, or an error.</returns>
Task<Result<IReadOnlyList<TrackEntity>>> GetByIdsAsync(IReadOnlyCollection<Guid> trackIds, bool shouldIncludeNavigationProperties, CancellationToken cancellationToken);
}