Commit c6d9b72

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-09-01 06:18:30
chore(ytdlp): cache sent messages when video is uploaded
1 parent 989c84f
Changed files (1)
src
ytdlp
src/ytdlp/main.py
@@ -144,9 +144,9 @@ async def preview_ytdlp(
             if isinstance(subtitle_msg, Message):
                 sent_messages["caption"] = subtitle_msg
 
-    # only save messages when both video and audio are uploaded
+    # save messages when video is uploaded
     messages = [msg for msgs in sent_messages.values() for msg in (msgs if isinstance(msgs, list) else [msgs])]
-    if bool(use_db and info["video_path"].is_file() and info["audio_path"].is_file()):
+    if bool(use_db and info["video_path"].is_file()):
         metadata = {}
         for k in ["author", "author_url", "title", "url", "create_time", "duration", "description"]:
             if v := locals().get(k):