feat: Automatically delete associated source files when an audiobook project is removed.

This commit is contained in:
2026-03-11 14:28:11 +08:00
parent b7b6f5ef8e
commit d96089a2aa

View File

@@ -567,4 +567,9 @@ async def delete_project(
import shutil
shutil.rmtree(project_dir, ignore_errors=True)
if project.source_path:
source_file = Path(project.source_path)
if source_file.exists():
source_file.unlink(missing_ok=True)
crud.delete_audiobook_project(db, project_id, current_user.id)