diff --git a/app/api/v1/plugins.py b/app/api/v1/plugins.py index b8ecf89..7d45c97 100644 --- a/app/api/v1/plugins.py +++ b/app/api/v1/plugins.py @@ -267,6 +267,14 @@ def _scan_vst_in_dirs(dirs: list) -> list: """Walk các thư mục (plugin_dirs user) → danh sách VST giống /scan: file .vst3/.dll/.so + FOLDER tên X.vst3 (Windows VST3 = folder chứa X.vst3.dll bên trong).""" + def _inside_vst3_bundle(root: str) -> bool: + # Bỏ qua file NẰM TRONG folder .vst3 (vd ...\Ozone Pro.vst3\iZOzonePro.dll): + # folder .vst3 đã được tính là 1 plugin (đúng path bridge scan trả) — + # file .dll bên trong tạo entry TRÙNG path khác → không khớp block set + # của list_scan_all → FX (Ozone/Neutron...) lọt vào nút Synth. + parts = root.replace("/", os.sep).split(os.sep) + return any(p.lower().endswith(".vst3") for p in parts) + found = {} for d in dirs: if not d or not os.path.isdir(d): @@ -281,6 +289,8 @@ def _scan_vst_in_dirs(dirs: list) -> list: "id": name, "name": name, "type": "VST3", "path": os.path.join(root, sub), } + if _inside_vst3_bundle(root): + continue # file bên trong bundle VST3 — không phải plugin riêng for f in files: low = f.lower() if low.endswith(".vst3") or low.endswith(".dll") or low.endswith(".so"):