mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Moves the cancellation token to the last parameter position.
This commit is contained in:
1 parent
9a7a1dffb2
commit
006df1da3a
6 files changed
+741
-29
No files matched your search
+37
-2
@@ -2,6 +2,7 @@
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using Lumina.Domain.Common.Primitives;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
@@ -22,10 +23,25 @@ public interface IMusicArtworkService
|
||||
/// <param name="artistName">The name of the artist of the album.</param>
|
||||
/// <param name="albumTitle">The title of the album.</param>
|
||||
/// <param name="artwork">The artwork to store.</param>
|
||||
/// <param name="releaseTypeName">The name of the release type directory the album is stored under on disk, used to group the artwork of the different releases of an artist. When <see langword="null"/>, no release type segment is added.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <param name="releaseTypeName">The name of the release type directory the album is stored under on disk, used to group the artwork of the different releases of an artist. When omitted, no release type segment is added.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either the relative path of the stored artwork, or an error.</returns>
|
||||
Task<Result<string>> SaveAlbumArtworkAsync(Guid libraryId, Guid albumId, string libraryName, string artistName, string albumTitle, ArtworkDto artwork, CancellationToken cancellationToken, string? releaseTypeName = null);
|
||||
Task<Result<string>> SaveAlbumArtworkAsync(Guid libraryId, Guid albumId, string libraryName, string artistName, string albumTitle, ArtworkDto artwork, string? releaseTypeName, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Stores the uploaded <paramref name="artwork"/> of the album into the internal media directory, and returns the relative path of the stored artwork.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">The Id of the media library the album belongs to.</param>
|
||||
/// <param name="albumId">The Id of the album.</param>
|
||||
/// <param name="libraryName">The name of the media library the album belongs to.</param>
|
||||
/// <param name="artistName">The name of the artist of the album.</param>
|
||||
/// <param name="albumTitle">The title of the album.</param>
|
||||
/// <param name="artwork">The stream of the uploaded artwork to store.</param>
|
||||
/// <param name="fileName">The name of the uploaded artwork file.</param>
|
||||
/// <param name="releaseTypeName">The name of the release type directory the album is stored under on disk, used to group the artwork of the different releases of an artist. When <see langword="null"/>, no release type segment is added.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either the relative path of the stored artwork, or an error.</returns>
|
||||
Task<Result<string>> SaveAlbumArtworkAsync(Guid libraryId, Guid albumId, string libraryName, string artistName, string albumTitle, Stream artwork, string fileName, string? releaseTypeName, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the stored artwork of the album from the internal media directory.
|
||||
@@ -50,6 +66,18 @@ public interface IMusicArtworkService
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either the relative path of the stored artwork, or an error.</returns>
|
||||
Task<Result<string>> SaveArtistArtworkAsync(Guid libraryId, string libraryName, string artistName, ArtworkDto artwork, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Stores the uploaded <paramref name="artwork"/> of the artist into the internal media directory, and returns the relative path of the stored artwork.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">The Id of the media library the artist belongs to.</param>
|
||||
/// <param name="libraryName">The name of the media library the artist belongs to.</param>
|
||||
/// <param name="artistName">The name of the artist.</param>
|
||||
/// <param name="artwork">The stream of the uploaded artwork to store.</param>
|
||||
/// <param name="fileName">The name of the uploaded artwork file.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either the relative path of the stored artwork, or an error.</returns>
|
||||
Task<Result<string>> SaveArtistArtworkAsync(Guid libraryId, string libraryName, string artistName, Stream artwork, string fileName, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the stored artwork of the artist from the internal media directory.
|
||||
/// </summary>
|
||||
@@ -58,4 +86,11 @@ public interface IMusicArtworkService
|
||||
/// <param name="artistName">The name of the artist.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> representing either a successful operation, or an error.</returns>
|
||||
Result<Deleted> DeleteArtistArtwork(Guid libraryId, string libraryName, string artistName);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the stored artwork file at <paramref name="artworkRelativePath"/> from the internal media directory, when it still exists.
|
||||
/// </summary>
|
||||
/// <param name="artworkRelativePath">The relative path of the stored artwork file.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> representing either a successful operation, or an error.</returns>
|
||||
Result<Deleted> DeleteStoredArtwork(string artworkRelativePath);
|
||||
}
|
||||
Reference in new issue
Block a user