Add sequences field to search book response

This commit is contained in:
2023-05-26 22:33:49 +02:00
parent b738355f7c
commit 7462ca5b72
2 changed files with 2 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ class Book(BaseModel):
uploaded: date
authors: list[Author]
translators: list[Author]
sequences: list[Sequence]
annotation_exists: bool
@@ -40,7 +41,6 @@ class BookBaseInfo(BaseModel):
class BookDetail(RemoteBook):
sequences: list[Sequence]
genres: list[BookGenre]
is_deleted: bool
pages: Optional[int]

View File

@@ -92,7 +92,7 @@ class GetRandomBookService(GetRandomService[BookDB, RandomBookServiceQuery]):
class BookMeiliSearchService(MeiliSearchService):
MODEL_CLASS = BookDB
PREFETCH_RELATED = ["source"]
SELECT_RELATED = ["authors", "translators", "annotations"]
SELECT_RELATED = ["authors", "translators", "annotations", "sequences"]
MS_INDEX_NAME = "books"
MS_INDEX_LANG_KEY = "lang"