mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-08 09:30:43 +01:00
Add sequences field to search book response
This commit is contained in:
@@ -26,6 +26,7 @@ class Book(BaseModel):
|
|||||||
uploaded: date
|
uploaded: date
|
||||||
authors: list[Author]
|
authors: list[Author]
|
||||||
translators: list[Author]
|
translators: list[Author]
|
||||||
|
sequences: list[Sequence]
|
||||||
annotation_exists: bool
|
annotation_exists: bool
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +41,6 @@ class BookBaseInfo(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class BookDetail(RemoteBook):
|
class BookDetail(RemoteBook):
|
||||||
sequences: list[Sequence]
|
|
||||||
genres: list[BookGenre]
|
genres: list[BookGenre]
|
||||||
is_deleted: bool
|
is_deleted: bool
|
||||||
pages: Optional[int]
|
pages: Optional[int]
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class GetRandomBookService(GetRandomService[BookDB, RandomBookServiceQuery]):
|
|||||||
class BookMeiliSearchService(MeiliSearchService):
|
class BookMeiliSearchService(MeiliSearchService):
|
||||||
MODEL_CLASS = BookDB
|
MODEL_CLASS = BookDB
|
||||||
PREFETCH_RELATED = ["source"]
|
PREFETCH_RELATED = ["source"]
|
||||||
SELECT_RELATED = ["authors", "translators", "annotations"]
|
SELECT_RELATED = ["authors", "translators", "annotations", "sequences"]
|
||||||
|
|
||||||
MS_INDEX_NAME = "books"
|
MS_INDEX_NAME = "books"
|
||||||
MS_INDEX_LANG_KEY = "lang"
|
MS_INDEX_LANG_KEY = "lang"
|
||||||
|
|||||||
Reference in New Issue
Block a user