mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
294bb13987
Keep the narration marker a reading progress write leaves out. The save turned an omitted positionSeconds, mediaOverlayFragment or mediaOverlaySectionIndex into null and wrote it, so any client saving only its text position erased the marker another client had left. An explicit null still clears it. The audiobook-to-ebook sync now moves narrationUpdatedAt and the narration percentage with the marker it writes, so a comparison of stamps no longer prefers an older text position. Answer TTS requests as their types say. A position never saved is JSON null rather than an empty 200 body, and the book preferences PUT answers providerId, voiceId, speed and bookId, with the provider as a string. TtsPosition gains the updatedAt the route has always sent. Refuse with a 400 what used to reach the database as a 500: a null speed for the account (now left unchanged), a provider id that names no provider, a voiceId over 200 characters, a cfi, fragment or Kobo location longer than its column, and a fractional or oversized section index. Voices for a provider id that is not a number answer 404. Match the reader's blocks in chapter text: tag names now match whole, so <picture>, <param>, <link>, <track> and SVG shapes no longer open blocks foliate does not count. The chapter href is percent-decoded, and cached text is keyed by the file's modified time. Build a narration playlist once per copy of the file instead of on every overlay audio request, answer an unsatisfiable range with 416 and ignore an unreadable Range header. The iOS app now plays online read-along audio from this route in 512 KB ranges, so it is asked several times per clip. Give plain synthesis the captioned path's 120 s limit beside the client's own cancel signal, and voice listing and connection tests a 30 s one.