mirror of
https://github.com/booklore-app/booklore.git
synced 2026-02-18 00:17:53 +01:00
fix: use audiobook thumbnail URL for audiobook entries in notebook (#2763)
This commit is contained in:
@@ -21,6 +21,7 @@ public class NotebookEntry {
|
||||
private String color;
|
||||
private String style;
|
||||
private String chapterTitle;
|
||||
private String primaryBookType;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ public interface NotebookEntryRepository extends Repository<AnnotationEntity, Lo
|
||||
String getColor();
|
||||
String getStyle();
|
||||
String getChapterTitle();
|
||||
String getPrimaryBookType();
|
||||
LocalDateTime getCreatedAt();
|
||||
LocalDateTime getUpdatedAt();
|
||||
}
|
||||
@@ -56,6 +57,7 @@ public interface NotebookEntryRepository extends Repository<AnnotationEntity, Lo
|
||||
|
||||
@Query(value = "SELECT t.id, t.type, t.book_id AS bookId, t.book_title AS bookTitle, " +
|
||||
"t.text, t.note, t.color, t.style, t.chapter_title AS chapterTitle, " +
|
||||
"(SELECT bf.book_type FROM book_file bf WHERE bf.book_id = t.book_id ORDER BY bf.id LIMIT 1) AS primaryBookType, " +
|
||||
"t.created_at AS createdAt, t.updated_at AS updatedAt " +
|
||||
"FROM (" + ENTRIES_UNION + ") t" + ENTRIES_FILTER,
|
||||
countQuery = "SELECT COUNT(*) FROM (" + ENTRIES_UNION + ") t" + ENTRIES_FILTER,
|
||||
|
||||
@@ -81,6 +81,7 @@ public class NotebookService {
|
||||
.color(p.getColor())
|
||||
.style(p.getStyle())
|
||||
.chapterTitle(p.getChapterTitle())
|
||||
.primaryBookType(p.getPrimaryBookType())
|
||||
.createdAt(p.getCreatedAt())
|
||||
.updatedAt(p.getUpdatedAt())
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user