Skip to content

Release v1.31: About this book, ratings and a new Grid - #44

Merged
M1sterMo merged 14 commits into
mainfrom
v1.31
Nov 23, 2026
Merged

M1sterMo merged 14 commits into
mainfrom
v1.31

Conversation

@M1sterMo

Copy link
Copy Markdown
Owner

Release v1.31: About this book, ratings and a new Grid.

What's in it

  • About this book: a sheet with synopsis, narrator, series, genre and length, from the book menu or a player toolbar button (Place for synopsis #39). Synopses come from desc.txt/description.txt or the file tags; one typed in Edit book wins.
  • Ratings: 1–5 stars from the About sheet, the end of a book (asked once) or the stats book page, shown in the library and the stats Finished list.
  • Grid redesign after the original Voice: whole square covers, the time on the cover, a bar on every book, one-line titles ([Idea] an option to change how the series folder thumbnails looks #42). Books tiles get the same treatment.
  • Series stacks: the next book steps out behind the first, a tone darker, with the Grid front on a soft shadow; an opened series follows the library view.
  • Performance ([Bug] Performance drop when scrolling past series folders #43): jackets are drawn once and reused; opening a series no longer runs an unseen ripple on the render thread, so it holds the display's full rate; covers keep their shape flying to and from the player.
  • Scanning ported from upstream Voice (merged from a1-scan-correctness, history kept): folder changes scan right away, books copied in while away show up on return, read-only folders, cheaper cover search, no startup progress bar, "No access" + "Allow access" for lost folders, folder help tips.
  • Folder moves keep a book's data: renaming or moving a book folder, or changing a folder's mode, keeps progress, bookmarks, history, ratings, chapter names, characters, shelf/series place and up next.
  • DB 73, backup format 9 (older backups still restore). Version 1.31 / 5408024.

Testing

  • CI-equivalent gate: Android Lint, all unit tests, ktlint, debug and release builds.
  • Device tests on an emulator: About, series, Books library, shelves, the 11 regression and smoke tests.
  • Emulator drills of the scan work (10 scenarios: adds, background copies/deletes, renames and moves, copies, folder removal, lost access, mode changes, 150–455 books, upgrade); the three bugs found were fixed and drilled again.
  • Issue [Bug] Performance drop when scrolling past series folders #43's library (57 books, 7 series) on a software-GPU emulator, v1.30 vs v1.31: Books scroll 300 → 61 ms median frame, inside a series 500 → 125 ms, opening a series 450 → 150 ms; Grid about level.
  • On a 120 Hz phone: library scroll 0 janky frames in 2,602; series opening every frame at 8.3 ms.
  • Signed release builds tested on a phone through 1.31-test21.

Mistermo added 14 commits November 23, 2026 11:39
…heaply

Ported from upstream Voice where it applies, plus fixes of our own:

- Adding or removing a folder scans right away and restarts a scan that is
  still reading the old folders. Before, only reopening the library picked
  a new folder up, and a scan already running dropped it.
- A request while covers are looked for starts a new scan instead of being
  folded into one that already read the folders (Voice #4152). Covers run
  in their own job, so a request skipped by the cooldown leaves them alone.
  One file scan runs at a time; a forced re-parse carries over restarts.
- Coming back from the background scans past the 5-minute cooldown, unless
  a scan finished within 30 s (Voice #4147's intent).
- scanAndAwait waits for the latest scan and its covers, even across a
  restart, so a restore never reads a library a scan is still changing.
- One app-wide chapter cache, thread-safe, without the 1000-entry clear
  that made every library emission query each chapter (Voice #3866).
- The storage-permission-bug card can show again: the scanner and the
  library now share one instance (Voice #3943).
- The scan reconcile writes only books whose state flips, not every row.
- Take READ and WRITE folder grants separately, so a read-only picker grant
  doesn't drop the folder (Voice #3944).
- Skip a book with too many files for one database row instead of
  crashing on every start (Voice #3907, scanner half).
- Deactivate through update, not a stale put, when a folder is removed or
  a book loses its audio.
The library rebuilt every book from its chapters and grouped every
listening session on the main thread, again on each position save while
a book plays. Both now run on the io dispatcher and keep only the latest
result, as upstream Voice's library() does.

The view model test now lets the library arrive before it checks that
the missing column count alone holds the first state back.
… one

- List a book folder once through CachedDocumentFile and pick images by
  extension, instead of a provider query per file (Voice #3939). HEIC,
  HEIF, AVIF and JFIF covers count too.
- Remember a book whose first files hold no embedded cover, keyed by
  those files' state, so they're read again only after they change
  (Voice #4154, without a database column). The store is excluded from
  backup and replaces itself if corrupt.
- Give up on an embedded-cover read after a minute (Voice #4152). A file
  that can't be read now, Matroska included, is tried again next scan
  instead of being remembered as having no cover.
- Delete a cover candidate unless the book took it, also when the cover
  search is cancelled; one book's storage error no longer ends the search
  for the others.
…ccess

Ported from upstream Voice without its analytics and survey:

- Closing the folder picker without a folder shows "Didn't find your
  audiobooks?" with three answers and a tip for each: LibriVox, the
  Download folder Android won't hand out, copying from a computer, and
  why Audible or Spotify books won't play (Voice #3978, #4146). The
  answer only picks the tip; nothing is sent anywhere.
- A device without a file picker gets a card that says so instead of a
  button that does nothing (Voice #3987).
- Adding a folder again with another type moves it instead of finding
  its books twice (Voice #3803).
- Folders that lost their grant, like a removed SD card, show first in
  the folders list as "No access", with a button that opens the picker
  at them again (Voice #3949). Taking a grant again re-emits the folder
  flows, so the list and the scan follow.
- The folders list is in settings for everyone; with books in the
  library there was no way to reach it (Voice #3602).
- Remove the unused analytics-consent strings.
The library showed a progress bar under its top bar for every scan,
including the one on every start, and pushed the books down while it
did. Following upstream Voice (#3831, #3792):

- The bar is drawn over the library bar's bottom edge, so nothing moves,
  and only for a scan that runs for 3 s; a first import into an empty
  library shows it right away.
- The splash screen stays up until the library has its books (at most
  2 s), so the app opens onto the finished library.
- isLoading only means a scan runs. Restoring the scroll position and
  closing a series that is gone now wait for the library's first data,
  not for the scan to end, which could jump a list already scrolled.
…moves

A book's id is its folder or file, so renaming or moving a book folder,
changing a folder's mode, or adding the same folder through another one
made its books start over: progress, bookmarks, listening history and
stats stayed behind with an inactive copy. Ported from upstream Voice
(#3803, #3911) and widened to everything VoicePlus keeps per book.

Before a scan reconciles the library, the books it didn't find again are
remembered. A newly found book takes over from them when it shares their
documents (mode change, another folder) or, if it is new to the library,
when its files have the same names and sizes (rename, move). A copy of a
book that is still in the library, and a hidden or deleted book, start
fresh as before.

What moves, in one transaction: bookmarks, listening events and sessions
and chapter-name overrides of each mapped chapter; for the same book also
its remaining sessions, characters, shelf and series place, up next
position and its name, chapter offset, series group and cover. Progress
and playback settings come along from the copy played last if it was
played later. The current book follows. Scanning again changes nothing.
From an independent review of the whole branch:

- Only a never-played book takes over, and the old book is retired once it
  handed over (its last-played time, name override, series group, offset
  and cover cleared). So it can't hand over again: not to a later copy,
  not to a deleted book's files coming back, and its old name can't
  replace a newer one. Never played also survives a restarted scan, so a
  carry-over it cut short is picked up by the next one.
- The carry-over runs as one non-cancellable step.
- A scan that can't reconcile (an empty or unreadable folder) only takes
  books gone before as predecessors, so an unreadable SD card's books
  aren't stripped by a copy elsewhere.
- A shared document only counts as the same file when its size matches.
- Session ends are remapped after every session moved, and overrides only
  move from the books handing over.
- An OS-wipe restore no longer re-inserts a session that a renamed book
  carried over since the backup, which doubled its listened hours.
- A restart cancels the running scan right away; folder store edits are
  serialised; a forced re-parse is only remembered for a scan that runs.
A configured folder that lists no entries was taken for an unreadable one,
so while it stayed empty no move or deletion anywhere was reconciled and a
book moved out of it showed twice. Only a folder whose listing failed holds
reconciling back now.
Re-adding a folder with another mode gives its books new ids in other
folders, so only the progress carried over. The old book kept its name,
shelf and history and wasn't retired, and changing the mode back left the
book split in two. A book with exactly the same files now counts as the
same book.
A book that moved before leaves a retired row with the same files behind,
and a copy of the book matched it by file name and size on every scan,
taking its added date and shelf. A book with the files of a played book
that is still there is a copy and starts fresh.
…ce, and folder moves that keep a book's data
- About this book: a sheet with the cover, author, narrator, series,
  genre, length and synopsis, from the book menu or a player toolbar
  button. Synopses come from desc.txt/description.txt or the file tags;
  one typed in Edit book wins and survives rescans and backups.
- Ratings: 1-5 stars from the About sheet, the end of a book (asked
  once) or the stats book page; shown in the library and stats.
- Grid redesigned after the original Voice: whole square covers, a time
  chip on the cover, a bar on every book, a one-line title and an
  author row with the rating or percent. Books tiles get the same
  treatment.
- Series stacks: the next book steps out up-left behind the first, a
  tone darker, with the Grid front on a cached soft shadow; an opened
  series follows the library's view. The opening no longer ripples
  unseen on the render thread, so it runs at the display's full rate,
  and it waits only for the covers the stack shows.
- Jackets are drawn once into their cover image (#43). A cover flying
  to the player is drawn at its landing size from the first frame, and
  a tile flying home draws from the player's larger jacket, so neither
  stretches.
- Stats: the Finished list is date first with the rating on the cover,
  and covers follow the library look.
- A folder move or mode change also carries the rating and typed
  synopsis. DB 73, backup format 9.
… scans

A 57-book library like the reporter's, 20 single books and seven series
of 3 to 12, is scrolled past in Books and Grid view, then its largest
series is opened, scrolled and closed. Each launch now counts as coming
back to the app, which scans and retires books outside its folders, so
a scan runs first and the fixture is set up after it. Every fixture book
has a file of its own, so the carry-over can't take them for copies of
one book. Tiles are found by name wherever the cover's time puts it, the
series is searched for in short drags that don't fling past it, and a
tap is retried if the tile was redrawn. The Grid half now runs on v1.31.
The changelog adds the smoother series opening and the cover that keeps
its shape on the way to and from the player; the README lists folders
that keep a book's data through a rename or move.
@M1sterMo
M1sterMo merged commit bd58864 into main Nov 23, 2026
4 checks passed
@M1sterMo
M1sterMo deleted the v1.31 branch November 24, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant