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: