3.26072114
legado_app_3.26072114
Added
- Add token-protected pure JavaScript single-file book source save API to Web API with unified protection for write, search, and debug operations, non-persistent tokens, and enhanced isolation for body HTML, response, request size, idempotent save, and similar URL states
- Include CryptoJS 4.2.0 compatibility library providing MD5, SHA, HMAC, Base64, AES and other capabilities for rules and pure JS book sources with system secure random salt generation
- Add JS indicator to book source management list for quick distinction of pure JavaScript single-file book sources
Changed
- Restore Jsoup chaining compatibility for java.getElements(...) results in JavaScript rules, supporting attr, text, html and other legacy methods
- Restore compatibility with legacy JavaScript sources for with scope, E4X XML descendant selection, and nested eval Java method calls
- Change Brotli response to use underlying streaming decoder directly, removing unnecessary OkHttp wrapper dependency while maintaining br decompression and resource cleanup
- Support Cronet 151 conditional references for Android future Private Compute service, fixing compilation failure from missing classes in Release R8
- Close input stream promptly after checking local book file existence to avoid file handle accumulation from repeated entry into reading page
- Tighten video player R8 retention scope to only runtime reflection constructors and remove obsolete Media3 private field rules, reducing package size
- Simplify code editor R8 retention rules by delegating reflection model preservation to TextMate dependency and removing unused implementations, reducing package size
- Remove unused Kotlin built-in metadata from current runtime, reducing package size
- Compress TextMate syntax and theme configuration while maintaining JSON structure, reducing package size
- Simplify built-in help page code highlighting resources to only JavaScript, Java, HTML/XML, and plain text languages used in documentation, reducing package size
- Optimize invalid book cache cleanup by querying only necessary fields in normal cleanup and reading complete manga data only when manga retention policy is enabled
- Optimize reading background preview loading by delegating to image cache for built-in resources, avoiding synchronous full image data copying during list binding
- Optimize rule big data directory cleanup by batch validating book and RSS associations and reviewing before deletion, avoiding orphaned invalid directories
- Upgrade JavaScript execution engine to support for (const ... in ...) and block-level const, fixing syntax errors when importing or saving some JS book sources
- Optimize RSS source import preview batch matching and avoid repeated loading during interface rebuild causing state misalignment
- Optimize database queries for replacement rule import preview by batch matching and maintaining original import order
- Optimize database queries when exporting selected book sources by batch parsing and maintaining original selection order
Fixed
- Fix Rhino stack overflow caused by script reverse reading login information during dynamic login form initialization
- Fix JavaScript single-file book source parsing being treated as normal failure when cancelled, preventing continued error handling after leaving edit or import flow
- Fix Cronet update task parsing ABI filename by misreading string property, restoring version download, verification, and metadata generation
- Fix recursive reload triggered by closing old parser when opening local MOBI and PDF files, causing endless loading or unable to open
- Fix RSS reading history page unable to load when title is missing and support cases where corresponding subscription source is deleted
- Fix single RSS subscription source JSON unable to reimport
- Fix book source switching directory loading and WebDAV backup query swallowing coroutine cancellation signals
- Fix online typesetting configuration import causing duplicate addition on reimport, empty list not written, or success message appearing before persistence completion
- Fix identification failure for some Content Provider or JSON files of specific length
2026/07/20
- 修复动态登录表单初始化时脚本反向读取登录信息导致 Rhino 递归溢出的问题
- 恢复 JavaScript 规则中
java.getElements(...)返回结果的 Jsoup 链式调用兼容,支持继续使用attr、text、html等旧式写法 - 恢复旧版 JavaScript 源对
with作用域、E4X XML 后代选择和嵌套evalJava 方法调用的兼容 - Web API 新增带令牌保护的纯 JavaScript 单文件书源保存接口,统一保护书源写入、搜索和调试,令牌不再持久化,并加强正文 HTML、接口响应、请求大小、幂等保存和相似 URL 状态隔离
- Brotli 响应改为直接使用底层流式解码器,移除不再需要的 OkHttp 包装依赖并保持 br 解压与资源关闭行为
- 修复 JavaScript 单文件书源解析被取消时仍按普通失败处理的问题,避免离开编辑或导入流程后继续错误收尾
- 兼容 Cronet 151 对 Android 未来版本 Private Compute 服务的条件引用,修复 Release R8 缺失类导致的编译失败
- 修复 Cronet 更新任务解析 ABI 文件名时误读字符串属性,恢复版本下载、校验与元数据生成
- 修复本地 MOBI 与 PDF 打开时关闭旧解析器触发递归重载,导致文件一直加载或无法打开的问题
- 检查本地书籍文件是否存在后及时关闭输入流,避免重复进入阅读页积累文件句柄
- 收紧视频播放器的 R8 保留范围,仅保留运行时反射构造器并清理失效的 Media3 私有字段规则,减少安装包体积
- 精简代码编辑器的 R8 保留规则,交由 TextMate 依赖保留反射模型并移除未使用实现,减少安装包体积
- 精简当前运行时未使用的 Kotlin 内置元数据,减少安装包体积
- 压缩 TextMate 语法与主题配置,在保持 JSON 结构不变的前提下减少安装包体积
- 精简内置帮助页代码高亮资源,仅保留文档使用的 JavaScript、Java、HTML/XML 与纯文本语言,减少安装包体积
- 优化无效书籍缓存清理,普通清理仅查询必要字段,并仅在启用漫画保留策略时读取完整漫画数据
- 优化阅读背景预览加载,直接交由图片缓存读取内置资源,避免列表绑定时同步复制完整图片数据
- 内置 CryptoJS 4.2.0 兼容库,为规则与纯 JS 书源提供 MD5、SHA、HMAC、Base64、AES 等能力,并使用系统安全随机数生成随机盐
- 书源管理列表增加 JS 标识,便于快速区分纯 JavaScript 单文件书源
- 优化规则大数据目录清理,批量校验书籍与 RSS 关联并在删除前复核,避免残留无效空目录
- 升级 JavaScript 执行引擎,兼容
for (const ... in ...)与块级const,修复部分 JS 书源导入或保存时报语法错误的问题 - 优化 RSS 源导入预览的批量匹配,并避免界面重建时重复加载导致状态错位
- 修复 RSS 阅读记录标题缺失时页面无法加载,并兼容对应订阅源已删除的情况
- 优化替换规则导入预览时的数据库查询,批量匹配并保持原导入顺序
- 优化选中书源导出时的数据库查询,批量解析并保持原选择顺序
- 修复单个 RSS 订阅源 JSON 无法重新导入的问题
- 修复换源目录加载与 WebDAV 备份查询吞掉协程取消信号的问题
- 修复在线导入排版配置时再次导入重复添加、空列表未写入或成功提示早于持久化完成的问题
- 修复部分 Content Provider 或特定长度的 JSON 文件识别失败问题