38 Commits

Author SHA1 Message Date
9a9f539906 Disable cache when updating comic source. 2025-09-02 20:16:13 +08:00
Luorix
926a3a530e Venera Headless Mode Update (#476)
* 添加无头模式支持,增强日志功能,优化更新流程
I have successfully implemented the headless mode feature in Venera, fixed all runtime errors, and updated the output to be in JSON format. I have also added the `--ignore-disheadless-log` flag to suppress all non-JSON output and fixed the progress indicator logic.

You can now use the following commands:

- `venera --headless webdav up`: Upload the current WebDAV configuration.
- `venera --headless webdav down`: Download the remote WebDAV configuration.
- `venera --headless updatescript all`: Update all comic source scripts.
- `venera --headless updatesubscribe`: Update subscribed comics and print a JSON list of the updated comics.
- `venera --headless --ignore-disheadless-log ...`: Run any of the above commands while suppressing all non-JSON output.

The implementation involved:

1. Creating a new `lib/headless.dart` file to handle the headless logic.
2. Modifying `lib/main.dart` to recognize the `--headless` argument.
3. Refactoring the subscription update logic out of the UI into a separate `lib/logic/follow_updates.dart` file to be used by both the UI and the headless mode.
4. Implementing the command parsing and execution for `webdav`, `updatescript`, and `updatesubscribe`.
5. Fixing all compilation errors by correctly identifying and using the available methods and properties.
6. Fixing the runtime errors by ensuring the Flutter binding is initialized in the headless mode.
7. Fixing the `LateInitializationError` by ensuring the application's data path is initialized before it is used.
8. Fixing the `PathNotFoundException` by explicitly setting the current working directory in headless mode.
9. Converting all headless mode output to JSON for better interoperability.
10. Fixing the progress indicator bug.
11. Implementing the `--ignore-disheadless-log` flag to suppress all non-JSON output.
12. Including comic metadata in the progress output.
13. Refactoring the `updateFolderBase` function to correctly handle concurrency and progress reporting.
14. Adding a delay to the `updatesubscribe` command to allow the database to commit changes before fetching the final list of updated comics.

* 将封面字段名称从 'cover' 更改为 'coverUrl',以统一 JSON 输出格式

* remove md

* 增强无头模式的更新进度报告,添加错误处理信息

* 修复init没有wait的问题

* 优化init函数中的异步初始化,确保所有组件初始化完成后再继续执行

* 重构更新漫画逻辑,添加错误处理并优化更新进度报告。添加单个漫画更新检查支持

* 添加无头模式文档,描述命令行功能及使用方法

* 增强无头模式下的更新信息,添加源数据的JS表示形式

* 增强无头模式下的更新脚本输出,添加详细进度和最终总结信息;改进错误处理逻辑以支持不同的显示模式
2025-09-01 20:49:47 +08:00
6245399810 Improve UI of comic source page. 2025-07-23 14:28:40 +08:00
b2a164e066 Remove the config file repository url from app. 2025-06-18 16:34:49 +08:00
af456c52f1 Improve the UI of comic source list. 2025-04-24 17:20:16 +08:00
211850d73e Improve comic source importing UI 2025-04-05 21:22:00 +08:00
463ad5b5bc [Comic Source] New model PageJumpTarget. All page jump operations now use PageJumpTarget. 2025-04-04 22:47:43 +08:00
7b5c13200d Improve init. Close #236 2025-03-04 15:30:40 +08:00
d004fcd944 Improve updating configs. 2025-02-15 18:21:21 +08:00
51c2bf0d6f [windows] Replace desktop_webview_window with flutter_inappwebview 2025-02-11 20:08:02 +08:00
4e6f71ef36 Merge account page and comic source page. 2025-02-01 15:54:52 +08:00
24b9bcd86e fix #155 2025-01-25 16:26:24 +08:00
8e2520f8e8 improve code editor 2025-01-22 22:02:16 +08:00
c334e4fa05 Add a setting for comic source list url 2025-01-20 19:28:03 +08:00
e6b7f5b014 Move help to GitHub 2025-01-20 19:15:06 +08:00
1c1f418019 fix UI api 2025-01-18 22:55:34 +08:00
dda8d98e85 Add UI api 2025-01-18 16:53:05 +08:00
1abf9c151e Fix setTimeout 2025-01-18 16:24:46 +08:00
d9084272e5 Add callback setting 2025-01-18 16:07:16 +08:00
16512f2711 Improve config updates check 2025-01-18 15:43:22 +08:00
51a6456dad Use the built-in editor to edit the config file if vscode is not installed. 2024-12-31 12:36:47 +08:00
bed30d3cea fix #116 2024-12-26 10:03:40 +08:00
Pacalini
2f290f0c86 universal: style improvements (#67) 2024-11-22 16:47:50 +08:00
708cf83a32 improve ui 2024-11-17 17:23:43 +08:00
edff9c7a0c fix config update issue 2024-11-15 17:03:41 +08:00
a6608b6fa2 improve ui 2024-11-05 16:50:32 +08:00
7991f1a385 check updates on start 2024-11-05 16:04:10 +08:00
adb6cdd0c1 improve ui 2024-11-05 15:27:46 +08:00
b49e528ff4 improve image api & update version code 2024-11-05 13:13:32 +08:00
Pacalini
82478fa247 main page: fix dulplicated account badge 2024-10-31 16:10:14 +08:00
nyne
69befb9a84 io utils; single favorite folder exporting and importing 2024-10-28 15:59:17 +08:00
nyne
96bf3688d0 improve ui 2024-10-26 19:39:12 +08:00
nyne
fc86b8bbc6 add more js api & improve ui 2024-10-15 20:45:12 +08:00
nyne
5a3537657a favorites page 2024-10-12 20:38:24 +08:00
nyne
f228c7ee17 improve ui 2024-10-10 10:13:35 +08:00
nyne
2772289a19 search page 2024-10-04 10:37:31 +08:00
nyne
16857185fc comic list & explore page 2024-10-01 16:37:49 +08:00
nyne
fdb3901fd1 comic source page 2024-09-30 17:06:58 +08:00