File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ def __init__(
2727 ):
2828 super ().__init__ ()
2929 self .xhs = app
30+ self ._previous_print_func = None
3031
3132 def compose (self ) -> ComposeResult :
3233 yield Header ()
@@ -46,13 +47,22 @@ async def run_monitor(self):
4647
4748 def on_mount (self ) -> None :
4849 self .title = PROJECT
50+ self ._previous_print_func = self .xhs .print .func
4951 self .xhs .print .func = self .query_one (RichLog )
5052 self .run_monitor ()
5153
54+ def _restore_print_func (self ) -> None :
55+ if self ._previous_print_func is not None :
56+ self .xhs .print .func = self ._previous_print_func
57+
5258 async def action_close (self ):
5359 self .xhs .stop_monitor ()
60+ self ._restore_print_func ()
5461 await self .app .action_back ()
5562
63+ def on_unmount (self ) -> None :
64+ self ._restore_print_func ()
65+
5666 async def action_quit (self ) -> None :
5767 await self .action_close ()
5868 await self .app .action_quit ()
Original file line number Diff line number Diff line change 11** 项目更新内容:**
22
331 . 修复 ParserError 导致应用崩溃的问题
4- 2 . 修复 CLI 模式 KeyError 异常
5- 3 . 修复控制字符导致程序报错的问题
6- 4 . 修复部分分享链接提取失败的问题
7- 5 . 优化用户脚本与程序联动功能
8- 6 . 优化视频下载链接提取逻辑
9- 7 . 新增单独保存作品信息功能
10- 8 . 重构项目内置请求延时机制
11- 9 . 新增对 RedNote 的支持
12- 10 . 支持图形用户交互界面
4+ 2 . 修复模式切换后状态显示异常的问题
5+ 3 . 修复 CLI 模式 KeyError 异常
6+ 4 . 修复控制字符导致程序报错的问题
7+ 5 . 修复部分分享链接提取失败的问题
8+ 6 . 优化用户脚本与程序联动功能
9+ 7 . 优化视频下载链接提取逻辑
10+ 8 . 新增单独保存作品信息功能
11+ 9 . 重构项目内置请求延时机制
12+ 10 . 新增对 RedNote 的支持
13+ 11 . 支持图形用户交互界面
1314
1415*****
1516
You can’t perform that action at this time.
0 commit comments