Commit 77194ec

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-01-30 08:31:24
chore: show error message on force update
1 parent d05ae8d
Changed files (3)
src/preview/weibo.py
@@ -65,7 +65,7 @@ async def preview_weibo(
             await modify_progress(text=f"❌微博解析失败: {error_msg}\n尝试第三方Bot...", **kwargs)
             await send_to_social_media_bridge(client, message, url, **kwargs)
         else:
-            await modify_progress(text=f"❌微博解析失败: {error_msg}", **kwargs)
+            await modify_progress(text=f"❌微博解析失败: {error_msg}", force_update=True, **kwargs)
         return
     quote_info = await parse_weibo_info(post_id, this_info["reply_data"], **kwargs) if this_info.get("reply_data") else {}
 
src/preview/xiaohongshu.py
@@ -57,7 +57,7 @@ async def preview_xhs(client: Client, message: Message, url: str = "", db_key: s
             full_url = f"https://{db_key}?xsec_token={xsec}"
             await send_to_social_media_bridge(client, message, full_url, **kwargs)
         else:
-            await modify_progress(text="❌小红书解析失败, 请稍候再尝试", **kwargs)
+            await modify_progress(text="❌小红书解析失败, 请稍候再尝试", force_update=True, **kwargs)
         return
     await modify_progress(text="✅解析成功, 正在处理...", **kwargs)
     media: list[dict] = []
src/preview/ytdlp.py
@@ -111,12 +111,12 @@ async def preview_ytdlp(
         if proxy != PROXY.YTDLP_FALLBACK and ("Sign in" in error_msg or "请登录" in error_msg):
             raise ProxyError(error_msg)
         cache.delete("modify_progress")
-        await modify_progress(text=error_msg, **kwargs)
+        await modify_progress(text=error_msg, force_update=True, **kwargs)
         return
     logger.trace(info)
     download_info = info["requested_downloads"][0]
     if not download_info:
-        await modify_progress(text="❌下载失败, 请重试", **kwargs)
+        await modify_progress(text="❌下载失败, 请重试", force_update=True, **kwargs)
         return
 
     final_path = Path(download_info.get("filepath", ""))  # maybe video or audio