feat(cbz): adapt reader to real archive structure — PageIndex skips macOS junk (__MACOSX/ and ._ AppleDouble were polluting pages with 163-byte blacks), pages endpoint derives chapters[{title,start}] from folder layout, imageless zip now lands state=error instead of an empty reader, CbzReader gains 目录 sidebar + prev/next chapter (TextReader pattern, rd-* classes); pagesidx cache key bumped for one-time invalidation; e2e on 311MB 調教開關:第二季.zip: 15048→7524 real pages, 52 chapters, all JPEGs
This commit is contained in:
@@ -172,7 +172,8 @@ export const api = {
|
||||
},
|
||||
getBook: (id: number) => apiFetch<Book>(`/books/${id}`),
|
||||
deleteBook: (id: number) => apiFetch<void>(`/books/${id}`, { method: "DELETE" }),
|
||||
pageCount: (pagesUrl: string) => apiFetch<{ count: number }>(pagesUrl),
|
||||
pageCount: (pagesUrl: string) =>
|
||||
apiFetch<{ count: number; chapters?: { title: string; start: number }[] | null }>(pagesUrl),
|
||||
|
||||
putProgress: (id: number, locator: Record<string, unknown>, percent: number, keepalive = false) =>
|
||||
apiFetch<void>(`/books/${id}/progress`, { method: "PUT", body: { locator, percent }, keepalive }),
|
||||
|
||||
Reference in New Issue
Block a user