Display library name in metadata viewer page (#1211)
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
|
||||
public interface BookMapper {
|
||||
|
||||
@Mapping(source = "library.id", target = "libraryId")
|
||||
@Mapping(source = "library.name", target = "libraryName")
|
||||
@Mapping(source = "libraryPath", target = "libraryPath", qualifiedByName = "mapLibraryPathIdOnly")
|
||||
@Mapping(source = "metadata", target = "metadata")
|
||||
@Mapping(source = "shelves", target = "shelves")
|
||||
@@ -30,6 +31,7 @@ public interface BookMapper {
|
||||
Book toBook(BookEntity bookEntity);
|
||||
|
||||
@Mapping(source = "library.id", target = "libraryId")
|
||||
@Mapping(source = "library.name", target = "libraryName")
|
||||
@Mapping(source = "libraryPath", target = "libraryPath", qualifiedByName = "mapLibraryPathIdOnly")
|
||||
@Mapping(source = "metadata", target = "metadata")
|
||||
@Mapping(source = "shelves", target = "shelves")
|
||||
@@ -37,14 +39,6 @@ public interface BookMapper {
|
||||
@Mapping(source = "additionalFiles", target = "supplementaryFiles", qualifiedByName = "mapSupplementaryFiles")
|
||||
Book toBookWithDescription(BookEntity bookEntity, @Context boolean includeDescription);
|
||||
|
||||
@Mapping(source = "library.id", target = "libraryId")
|
||||
@Mapping(source = "libraryPath", target = "libraryPath", qualifiedByName = "mapLibraryPathIdOnly")
|
||||
@Mapping(target = "metadata", ignore = true)
|
||||
@Mapping(target = "shelves", ignore = true)
|
||||
@Mapping(target = "alternativeFormats", ignore = true)
|
||||
@Mapping(target = "supplementaryFiles", ignore = true)
|
||||
Book toBookWithoutMetadataAndShelves(BookEntity bookEntity);
|
||||
|
||||
default Set<String> mapAuthors(Set<AuthorEntity> authors) {
|
||||
if (authors == null) return null;
|
||||
return authors.stream()
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.stream.Collectors;
|
||||
public interface BookMapperV2 {
|
||||
|
||||
@Mapping(source = "library.id", target = "libraryId")
|
||||
@Mapping(source = "library.name", target = "libraryName")
|
||||
@Mapping(source = "libraryPath", target = "libraryPath", qualifiedByName = "mapLibraryPathIdOnly")
|
||||
@Mapping(target = "metadata", qualifiedByName = "mapMetadata")
|
||||
Book toDTO(BookEntity bookEntity);
|
||||
|
||||
@@ -17,6 +17,7 @@ public class Book {
|
||||
private Long id;
|
||||
private BookFileType bookType;
|
||||
private Long libraryId;
|
||||
private String libraryName;
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
private String fileSubPath;
|
||||
|
||||
Reference in New Issue
Block a user