From ece5f313b311041d2caa13c8b4b3a304f792bd4f Mon Sep 17 00:00:00 2001 From: locpham Date: Sat, 22 Aug 2026 03:46:13 +0000 Subject: [PATCH] =?UTF-8?q?fix(available):=20=5Fscan=5Fvst=5Fin=5Fdirs=20b?= =?UTF-8?q?o=20qua=20file=20.dll=20ben=20trong=20folder=20.vst3=20(bundle)?= =?UTF-8?q?=20=E2=80=94=20FX=20Ozone/Neutron=20khong=20con=20lot=20vao=20n?= =?UTF-8?q?ut=20Synth=20(path=20trung=20khong=20khop=20block=20set)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/v1/plugins.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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"):