mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Adds book deletion and restore to the web client.
Soft deletes books so the scan keeps their paths reserved, lists the deleted books on a themed page, and lets the user restore them. Updates the API, bundled themes, localization, documentation and tests. Closes #213
This commit is contained in:
1 parent
ef5ede6325
commit
f26b07d4ff
125 files changed
+9856
-378
No files matched your search
+19
@@ -258,6 +258,25 @@ public static class BookEntityMapping
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a deleted <paramref name="repositoryEntity"/> to <see cref="DeletedBookResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="repositoryEntity">The deleted repository entity to be converted.</param>
|
||||
/// <param name="deletedOnUtc">The date and time when the book was deleted.</param>
|
||||
/// <returns>The converted deleted book response.</returns>
|
||||
public static DeletedBookResponse ToResponse(this BookEntity repositoryEntity, DateTime deletedOnUtc)
|
||||
{
|
||||
return new DeletedBookResponse(
|
||||
repositoryEntity.Id,
|
||||
repositoryEntity.LibraryId,
|
||||
repositoryEntity.Title,
|
||||
repositoryEntity.OriginalTitle,
|
||||
repositoryEntity.Path,
|
||||
deletedOnUtc,
|
||||
repositoryEntity.Artwork.FirstOrDefault(artwork => artwork.ArtworkType == ArtworkType.Cover)?.FileName
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts <paramref name="repositoryEntities"/> to a collection of <see cref="Book"/>.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user