File tree Expand file tree Collapse file tree
platform/sources/wechatpadpro Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,7 +242,9 @@ async def convert_to_file_path(self) -> str:
242242 return url [8 :]
243243 if url and url .startswith ("http" ):
244244 download_dir = str (AstrbotPaths .astrbot_root / "temp" )
245- video_file_path = str (AstrbotPaths .astrbot_root / "temp" / f"{ uuid .uuid4 ().hex } " )
245+ video_file_path = str (
246+ AstrbotPaths .astrbot_root / "temp" / f"{ uuid .uuid4 ().hex } "
247+ )
246248 await download_file (url , video_file_path )
247249 if os .path .exists (video_file_path ):
248250 return os .path .abspath (video_file_path )
@@ -442,7 +444,9 @@ async def convert_to_file_path(self) -> str:
442444 bs64_data = url .removeprefix ("base64://" )
443445 image_bytes = base64 .b64decode (bs64_data )
444446 temp_dir = str (AstrbotPaths .astrbot_root / "temp" )
445- image_file_path = str (AstrbotPaths .astrbot_root / "temp" / f"{ uuid .uuid4 ()} .jpg" )
447+ image_file_path = str (
448+ AstrbotPaths .astrbot_root / "temp" / f"{ uuid .uuid4 ()} .jpg"
449+ )
446450 with open (image_file_path , "wb" ) as f :
447451 f .write (image_bytes )
448452 return os .path .abspath (image_file_path )
Original file line number Diff line number Diff line change @@ -788,7 +788,9 @@ async def _process_message_content(
788788 voice_bs64_data = base64 .b64decode (voice_bs64_data )
789789 temp_dir = str (AstrbotPaths .astrbot_root / "temp" )
790790 file_path = str (
791- AstrbotPaths .astrbot_root / "temp" / f"wechatpadpro_voice_{ abm .message_id } .silk"
791+ AstrbotPaths .astrbot_root
792+ / "temp"
793+ / f"wechatpadpro_voice_{ abm .message_id } .silk"
792794 )
793795
794796 async with await anyio .open_file (file_path , "wb" ) as f :
Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ def __init__(
3838 if webui_dir and os .path .exists (webui_dir ):
3939 self .data_path = os .path .abspath (webui_dir )
4040 else :
41- self .data_path = os .path .abspath (
42- str (AstrbotPaths .astrbot_root / "dist" )
43- )
41+ self .data_path = os .path .abspath (str (AstrbotPaths .astrbot_root / "dist" ))
4442
4543 self .app = Quart ("dashboard" , static_folder = self .data_path , static_url_path = "/" )
4644 APP = self .app # noqa
You can’t perform that action at this time.
0 commit comments