fix(koreader): keep the configured file name on downloads

Plugins from 1.7.0 request a delivery variant, and every such download had
" - bo-<id>-<variant>" added to its name. Only copies that would share a path are
renamed now: a narrated EPUB's text-only copy and later same-format files. A new
<a|b|c> chained default also stops the default pattern naming authorless
standalone books "Standalone/ - <title>". See docs/READ_ALOUD_DELIVERY.md.

Closes #1893
This commit is contained in:
neon
2026-10-24 21:06:09 +00:00
parent 946855cd30
commit b9e5fe3a29
7 changed files with 244 additions and 22 deletions
@@ -7,6 +7,7 @@
* {token:modifier} a placeholder with a transform
* <...> an optional group, dropped when a placeholder inside it is empty
* <a|b> the same, with `b` used when `a` cannot be filled
* <a|b|c> `b` only when it fills, otherwise `c`
* / a path separator
*/
export type PatternPieceKind = 'literal' | 'token' | 'modifier' | 'optional' | 'fallback' | 'separator'