diff --git a/voice_upload.py b/voice_upload.py index d237fa1..8de1fb2 100644 --- a/voice_upload.py +++ b/voice_upload.py @@ -8,4 +8,7 @@ if not os.path.exists(upload_path): os.mkdir(upload_path) for filename in uploaded.keys(): #将上传的文件移动到指定的位置上 - shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "custom_character_voice.zip")) + if filename.endswith(".zip"): + shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "custom_character_voice.zip")) + elif filename.endswith(".rar"): + shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "custom_character_voice.rar")) \ No newline at end of file