From aaf97b1255ee7f778b87503696abd320f2111505 Mon Sep 17 00:00:00 2001 From: locpham Date: Sat, 22 Aug 2026 03:57:14 +0000 Subject: [PATCH] =?UTF-8?q?fix(available):=20bo=20qua=20.dll=20trong=20thu?= =?UTF-8?q?=20muc=20da=20co=20.vst3=20(iZotope=20installs=20.vst3=20+=20mo?= =?UTF-8?q?dule=20.dll=20cung=20thu=20muc)=20=E2=80=94=20FX=20khong=20con?= =?UTF-8?q?=20lot=20vao=20nut=20Synth=20(3/3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/v1/plugins.py | 17 ++++++++++++++--- app/core/vst_engine.py | 13 ++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/app/api/v1/plugins.py b/app/api/v1/plugins.py index 7d45c97..8665cec 100644 --- a/app/api/v1/plugins.py +++ b/app/api/v1/plugins.py @@ -291,14 +291,25 @@ def _scan_vst_in_dirs(dirs: list) -> list: } if _inside_vst3_bundle(root): continue # file bên trong bundle VST3 — không phải plugin riêng + # iZotope cài kiểu: thư mục chứa CẢ file .vst3 lẫn file .dll + # (iZOzonePro.dll là module/dependency — bridge scan chỉ nhận + # .vst3 là FX). Thư mục có file .vst3 → bỏ qua .dll (VST2 thật + # như Kong Audio vẫn giữ vì thư mục không có .vst3). + has_vst3_file = any(f.lower().endswith(".vst3") for f in files) for f in files: low = f.lower() - if low.endswith(".vst3") or low.endswith(".dll") or low.endswith(".so"): + if low.endswith(".vst3") or low.endswith(".so"): name = os.path.splitext(f)[0] if name not in found: found[name] = { - "id": name, "name": name, - "type": "VST3" if low.endswith(".vst3") else "VST2", + "id": name, "name": name, "type": "VST3", + "path": os.path.join(root, f), + } + elif low.endswith(".dll") and not has_vst3_file: + name = os.path.splitext(f)[0] + if name not in found: + found[name] = { + "id": name, "name": name, "type": "VST2", "path": os.path.join(root, f), } return list(found.values()) diff --git a/app/core/vst_engine.py b/app/core/vst_engine.py index 72c276e..ca23efc 100644 --- a/app/core/vst_engine.py +++ b/app/core/vst_engine.py @@ -330,9 +330,20 @@ class PluginManager: if any(p.lower().endswith(".vst3") for p in root.replace("/", os.sep).split(os.sep)): continue + # iZotope cài kiểu: thư mục chứa CẢ file .vst3 lẫn file .dll + # (iZOzonePro.dll là module/dependency, KHÔNG phải plugin độc + # lập — bridge scan chỉ nhận .vst3 là FX). Thư mục nào đã có + # file .vst3 → bỏ qua .dll (VST2 thật như Kong Audio vẫn giữ + # vì thư mục của nó không có .vst3). + has_vst3_file = any(f.lower().endswith(".vst3") for f in files) for file in files: low = file.lower() - if low.endswith(".vst3") or low.endswith(".so") or low.endswith(".dll"): + if low.endswith(".vst3") or low.endswith(".so"): + plugin_path = os.path.join(root, file) + plugin_name = os.path.splitext(file)[0] + if plugin_name not in plugins: + plugins[plugin_name] = plugin_path + elif low.endswith(".dll") and not has_vst3_file: plugin_path = os.path.join(root, file) plugin_name = os.path.splitext(file)[0] if plugin_name not in plugins: