feat: release QieKan 3.26.15
Auto Release / build (app, release) (push) Canceled after 0s
Auto Release / create_release (push) Canceled after 0s
Auto Release / prepare (push) Canceled after 0s
CodeQL / Analyze (java-kotlin) (java-kotlin) (push) Canceled after 0s
Deploy Docs / build (push) Canceled after 0s
Deploy Docs / Deploy (push) Canceled after 0s
Auto Release / build (app, release) (push) Canceled after 0s
Auto Release / create_release (push) Canceled after 0s
Auto Release / prepare (push) Canceled after 0s
CodeQL / Analyze (java-kotlin) (java-kotlin) (push) Canceled after 0s
Deploy Docs / build (push) Canceled after 0s
Deploy Docs / Deploy (push) Canceled after 0s
This commit is contained in:
@@ -136,7 +136,7 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/HapeLee/legado-with-MD3' },
|
||||
{ icon: 'github', link: 'https://gitea.yamby.cn/yusheng/QieKan-3.0' },
|
||||
],
|
||||
footer: {
|
||||
message: '基于 Apache-2.0 许可发布',
|
||||
@@ -157,8 +157,8 @@ export default defineConfig({
|
||||
text: '最后更新于',
|
||||
},
|
||||
editLink: {
|
||||
pattern: 'https://github.com/HapeLee/legado-with-MD3/edit/main/docs/:path',
|
||||
text: '在 GitHub 上编辑此页面',
|
||||
pattern: 'https://gitea.yamby.cn/yusheng/QieKan-3.0/_edit/main/docs/:path',
|
||||
text: '在 Gitea 上编辑此页面',
|
||||
},
|
||||
},
|
||||
lastUpdated: true,
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# 且看有声书融合架构
|
||||
|
||||
## 决策
|
||||
|
||||
且看将 Audiobookshelf 作为独立的伴随服务端,通过原生 Android 客户端模块接入。
|
||||
Node.js、Nuxt、Sequelize、服务端 SQLite、FFmpeg 和媒体扫描器不打包进 APK。
|
||||
|
||||
当前工作区中的 `.audiobookshelf` 仅用于协议核对和服务端 Fork 开发。正式维护时应将它
|
||||
保留为独立仓库或 Git submodule,并使用可识别的 Fork 版本号,例如
|
||||
`2.34.0-qiekan.1`。
|
||||
|
||||
## 模块边界
|
||||
|
||||
- `:modules:audiobookshelf-client`
|
||||
- Audiobookshelf REST 请求、DTO 和协议模型。
|
||||
- 不依赖且看的 Room、Compose、主题或阅读领域。
|
||||
- `app/domain/gateway/AudiobookGateway.kt` 与 `app/domain/model/AudiobookModels.kt`
|
||||
- 服务器、媒体库、书籍、播放会话和进度的领域接口及模型。
|
||||
- `app/data/audiobook`
|
||||
- 领域仓库、服务器配置映射和安全令牌存储。
|
||||
- `app/ui/audiobook`
|
||||
- Compose、MVI/UDF、Navigation 3 页面。
|
||||
- `app/service/audiobook`
|
||||
- 后续阶段新增的 Media3 `MediaSessionService`。
|
||||
|
||||
Audiobookshelf 条目不能映射为现有 `Book`/`BookChapter`,也不能直接写入旧版
|
||||
`AudioPlay` 的全局状态。远端条目统一使用 `serverId + libraryItemId` 标识。
|
||||
|
||||
## 认证与安全
|
||||
|
||||
- API 使用独立的标准 OkHttpClient,不复用且看支持书源规则的宽松 TLS 客户端。
|
||||
- 登录请求使用 `x-return-tokens: true`。
|
||||
- access token 仅保存在进程内存中。
|
||||
- refresh token 使用 Android Keystore 的 AES/GCM 密钥加密,并写入
|
||||
`noBackupFilesDir`,不进入且看备份。
|
||||
- 401 刷新采用 single-flight,避免刷新令牌并发轮换。
|
||||
- 服务器地址和用户名可随 `servers.json` 备份;密码和令牌不得进入配置 JSON。
|
||||
- 公网地址默认使用 HTTPS。HTTP 仅用于用户明确配置的可信局域网环境。
|
||||
|
||||
## 导航与隐私
|
||||
|
||||
首版入口位于“我的 > 有声书”,不增加默认第六个底部导航项。后续可将有声书加入
|
||||
主导航显示与排序设置,但默认保持隐藏。
|
||||
|
||||
后续接入且看首页“继续收听”、听书历史和统计时,必须在领域层统一应用隐私过滤,
|
||||
而不是由各个组件自行过滤。隐藏书库的内容不得进入首页、历史、统计和锁屏元数据。
|
||||
|
||||
## 实施阶段
|
||||
|
||||
1. 连接与浏览:服务器配置、登录、令牌刷新、媒体库和书籍列表。
|
||||
2. 播放:独立 Media3 Session、direct play、HLS、STRM、多音轨和进度同步。
|
||||
3. 体验融合:继续收听、迷你播放器、书签、历史、主导航和隐私联动。
|
||||
4. 离线:独立缓存数据库、断点续传、空间管理和离线进度回传。
|
||||
5. 高级能力:Socket.IO、OIDC、播客和 115 动态换链或代理。
|
||||
|
||||
## 第一阶段验收
|
||||
|
||||
- 可连接带根路径的 Audiobookshelf 地址,例如 `/audiobookshelf`。
|
||||
- 可使用用户名和密码登录,并列出当前账号可访问的媒体库。
|
||||
- 应用重启后可用加密 refresh token 恢复会话。
|
||||
- refresh token 无效时保留服务器地址和用户名,并要求重新输入密码。
|
||||
- WebDAV 服务器列表不显示 Audiobookshelf 类型的连接。
|
||||
- 旧备份恢复流程不变,备份文件中不包含 Audiobookshelf 密码或令牌。
|
||||
+2
-2
@@ -57,5 +57,5 @@
|
||||
|
||||
## 外部资源
|
||||
|
||||
- [Legado GitHub](https://github.com/HapeLee/legado-with-MD3) — 项目源码和 Issue 跟踪
|
||||
- [legado-with-MD3 Wiki](https://github.com/HapeLee/legado-with-MD3/wiki) — 社区维护的文档
|
||||
- [QieKan-3.0 Gitea](https://gitea.yamby.cn/yusheng/QieKan-3.0) — 项目源码和 Issue 跟踪
|
||||
- [QieKan-3.0 Wiki](https://gitea.yamby.cn/yusheng/QieKan-3.0/wiki) — 社区维护的文档
|
||||
|
||||
+12
-12
@@ -22,7 +22,7 @@ Java 类和方法。本文档列出所有可用的内置变量、对象属性和
|
||||
- `java` 变量已被 Legado 修改,调用 `java.*` 下的包请使用 `Packages.java.*`
|
||||
- 在源规则中使用 `@js`、`<js>`、<code v-pre>{{}}</code> 可调用 Legado 内置的类和方法
|
||||
- 为安全起见,部分 Java
|
||||
类调用被屏蔽,见 [RhinoClassShutter](https://github.com/HapeLee/legado-with-MD3/blob/master/modules/rhino/src/main/java/com/script/rhino/RhinoClassShutter.kt)
|
||||
类调用被屏蔽,见 [RhinoClassShutter](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/modules/rhino/src/main/java/com/script/rhino/RhinoClassShutter.kt)
|
||||
- 不同源规则中支持调用的 Java 类和方法可能不同
|
||||
- `const` 声明的变量不支持块级作用域,循环中使用会出现值不变的问题,请改用 `var`
|
||||
:::
|
||||
@@ -36,12 +36,12 @@ Java 类和方法。本文档列出所有可用的内置变量、对象属性和
|
||||
| `java` | `Object` | 全局 | 扩展工具对象,提供网络请求、加解密、文件操作等方法 |
|
||||
| `baseUrl` | `String` | 全局 | 当前请求的 URL |
|
||||
| `result` | `Any` | 全局 | 上一步规则的执行结果 |
|
||||
| `book` | `Book` | 全局 | [书籍对象](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/data/entities/Book.kt) |
|
||||
| `rssArticle` | `RssArticle` | 全局 | [RSS 文章对象](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/data/entities/RssArticle.kt) |
|
||||
| `chapter` | `BookChapter` | 全局 | [章节对象](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/data/entities/BookChapter.kt) |
|
||||
| `source` | `BaseSource` | 全局 | [源对象](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/data/entities/BaseSource.kt) |
|
||||
| `cookie` | `CookieStore` | 全局 | [Cookie 操作对象](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/help/http/CookieStore.kt) |
|
||||
| `cache` | `CacheManager` | 全局 | [缓存操作对象](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/help/CacheManager.kt) |
|
||||
| `book` | `Book` | 全局 | [书籍对象](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/data/entities/Book.kt) |
|
||||
| `rssArticle` | `RssArticle` | 全局 | [RSS 文章对象](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/data/entities/RssArticle.kt) |
|
||||
| `chapter` | `BookChapter` | 全局 | [章节对象](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/data/entities/BookChapter.kt) |
|
||||
| `source` | `BaseSource` | 全局 | [源对象](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/data/entities/BaseSource.kt) |
|
||||
| `cookie` | `CookieStore` | 全局 | [Cookie 操作对象](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/help/http/CookieStore.kt) |
|
||||
| `cache` | `CacheManager` | 全局 | [缓存操作对象](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/help/CacheManager.kt) |
|
||||
| `title` | `String` | 全局 | 当前章节标题 |
|
||||
| `src` | `String` | 全局 | 请求返回的源码 |
|
||||
| `nextChapterUrl` | `String` | 全局 | 下一章节 URL |
|
||||
@@ -50,7 +50,7 @@ Java 类和方法。本文档列出所有可用的内置变量、对象属性和
|
||||
|
||||
`java` 对象是 Legado 暴露给 JS 环境的核心工具对象,聚合了多个扩展类的方法。
|
||||
|
||||
### 3.1 RSS 扩展 ([RssJsExtensions](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/ui/rss/read/RssJsExtensions.kt))
|
||||
### 3.1 RSS 扩展 ([RssJsExtensions](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/ui/rss/read/RssJsExtensions.kt))
|
||||
|
||||
::: warning 作用域限制
|
||||
只能在订阅源 `shouldOverrideUrlLoading` 规则中使用。URL 跳转拦截规则不能执行耗时操作。
|
||||
@@ -61,7 +61,7 @@ java.searchBook(bookName: String) // 调用 Legado 搜索
|
||||
java.addBook(bookUrl: String) // 添加书架
|
||||
```
|
||||
|
||||
### 3.2 URL 解析 ([AnalyzeUrl](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt))
|
||||
### 3.2 URL 解析 ([AnalyzeUrl](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt))
|
||||
|
||||
通过 `java.` 调用,仅在 `登录检查 JS` 规则中有效。
|
||||
|
||||
@@ -72,7 +72,7 @@ java.addBook(bookUrl: String) // 添加书架
|
||||
| `getStrResponse(jsStr, sourceRegex)` | `StrResponse` | 返回文本类型的访问结果 |
|
||||
| `getResponse()` | `Response` | 返回 Response 类型的访问结果 |
|
||||
|
||||
### 3.3 规则解析 ([AnalyzeRule](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt))
|
||||
### 3.3 规则解析 ([AnalyzeRule](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt))
|
||||
|
||||
```js
|
||||
// 获取文本/文本列表
|
||||
@@ -95,7 +95,7 @@ java.get(key)
|
||||
java.put(key, value)
|
||||
```
|
||||
|
||||
### 3.4 扩展工具 ([JsExtensions](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/help/JsExtensions.kt))
|
||||
### 3.4 扩展工具 ([JsExtensions](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/help/JsExtensions.kt))
|
||||
|
||||
#### 链接解析
|
||||
|
||||
@@ -198,7 +198,7 @@ cache.delete(java.md5Encode16(url)) // 使缓存失效
|
||||
| `java.openUrl(url)` | 跳转外部链接(HTTP 或 scheme) |
|
||||
| `java.openUrl(url, mimeType)` | 指定 MIME 类型跳转,如 `video/*` |
|
||||
|
||||
### 3.5 加解密 ([JsEncodeUtils](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/help/JsEncodeUtils.kt))
|
||||
### 3.5 加解密 ([JsEncodeUtils](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/help/JsEncodeUtils.kt))
|
||||
|
||||
提供在 JavaScript 环境中快捷调用 crypto
|
||||
算法的函数,由 [hutool-crypto](https://www.hutool.cn/docs/#/crypto/概述) 实现(当前版本 5.8.22)。
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ JavaScript 执行。
|
||||
|
||||
| 变量 | 说明 |
|
||||
|:---------|:-------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `java` | 仅支持 [JsExtensions](https://github.com/HapeLee/legado-with-MD3/blob/master/app/src/main/java/io/legado/app/help/JsExtensions.kt) 中的方法 |
|
||||
| `java` | 仅支持 [JsExtensions](https://gitea.yamby.cn/yusheng/QieKan-3.0/src/branch/main/app/src/main/java/io/legado/app/help/JsExtensions.kt) 中的方法 |
|
||||
| `result` | 待解密图片的 `ByteArray` |
|
||||
| `src` | 图片链接 |
|
||||
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ hero:
|
||||
text: 开发文档
|
||||
link: /dev/
|
||||
- theme: alt
|
||||
text: GitHub
|
||||
link: https://github.com/HapeLee/legado-with-MD3
|
||||
text: Gitea
|
||||
link: https://gitea.yamby.cn/yusheng/QieKan-3.0
|
||||
|
||||
features:
|
||||
- icon: 📖
|
||||
|
||||
Reference in New Issue
Block a user