From 64aa9a9d016e5ccd7af65ffcae317b47cf51f928 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 20 Aug 2023 19:46:30 +0800 Subject: [PATCH] Update receive_music163_search.py --- plugins/tgbot/startup/extend/receive_music163_search.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/tgbot/startup/extend/receive_music163_search.py b/plugins/tgbot/startup/extend/receive_music163_search.py index 105792551..a5d7e3532 100644 --- a/plugins/tgbot/startup/extend/receive_music163_search.py +++ b/plugins/tgbot/startup/extend/receive_music163_search.py @@ -233,7 +233,10 @@ def downloadAndUpMusic(bot, chat_id, mid, title): else: bot.send_message(chat_id, "无效资源") - cleanMusicFileExpire(def_dir) + if os.path.exists(def_abs_path): + os.remove(def_abs_path) + + # cleanMusicFileExpire(def_dir) return True