fix: nut Synth tren TCP khong hien danh sach VSTi da scan (ban 1.1.5)
- Nut Synth TCP goi openInstrumentSelector (modal 'Select Instrument') nhung modal chi co category SoundFont + GM - khong co muc VST (muc VST chi ton tai o dropdown MixerStrip). Them 'VST Instruments' vao sidebar trai modal: list instrumentSelectorData.vst_instruments (listPlugins), click -> setTrackInstrumentWithUndo(trackId, v.id, v.name) + dong modal. - _scan_vst_in_dirs + /scan: phat hien ca FOLDER ten X.vst3 (Windows VST3 = folder chua X.vst3.dll) - truoc day chi scan file. - Ghi chu: pedalboard (engine VST) la headless - KHONG mo duoc GUI goc cua plugin; danh sach + chon la co che chon nhac cu kha thi. Verify engine frozen: /plugins/available tra ['PadMachine','UltraSynth'] (ca file va folder .vst3); /scan dong bo; test_plugin_api 3 passed.
This commit is contained in:
+20
-3
@@ -111,7 +111,14 @@ async def scan_plugin_dirs(background_tasks: BackgroundTasks = None,
|
||||
for d in plugin_dirs:
|
||||
if not os.path.isdir(d):
|
||||
continue
|
||||
for root, _dirs, files in os.walk(d):
|
||||
for root, dirs, files in os.walk(d):
|
||||
# Windows: VST3 là FOLDER tên X.vst3 (chứa X.vst3.dll bên trong)
|
||||
for sub in list(dirs):
|
||||
if sub.lower().endswith(".vst3"):
|
||||
vst_found.append({"name": os.path.splitext(sub)[0],
|
||||
"path": os.path.join(root, sub),
|
||||
"dir": d,
|
||||
"type": "VST3"})
|
||||
for f in files:
|
||||
low = f.lower()
|
||||
if low.endswith(".vst3") or low.endswith(".dll") or low.endswith(".so"):
|
||||
@@ -170,12 +177,22 @@ async def list_plugins(current_user: dict = Depends(get_current_user)):
|
||||
|
||||
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 (VST3 folder Windows = .vst3.dll bên trong)."""
|
||||
file .vst3/.dll/.so + FOLDER tên X.vst3 (Windows VST3 = folder chứa
|
||||
X.vst3.dll bên trong)."""
|
||||
found = {}
|
||||
for d in dirs:
|
||||
if not d or not os.path.isdir(d):
|
||||
continue
|
||||
for root, _dirs, files in os.walk(d):
|
||||
for root, dirs, files in os.walk(d):
|
||||
# Windows: VST3 là FOLDER tên X.vst3
|
||||
for sub in list(dirs):
|
||||
if sub.lower().endswith(".vst3"):
|
||||
name = os.path.splitext(sub)[0]
|
||||
if name not in found:
|
||||
found[name] = {
|
||||
"id": name, "name": name, "type": "VST3",
|
||||
"path": os.path.join(root, sub),
|
||||
}
|
||||
for f in files:
|
||||
low = f.lower()
|
||||
if low.endswith(".vst3") or low.endswith(".dll") or low.endswith(".so"):
|
||||
|
||||
@@ -29876,7 +29876,14 @@ STRICT CONSTRAINTS:
|
||||
},
|
||||
className: "w-full text-left px-3 py-2 text-sm rounded " + (selectedSoundFontId === sfId ? "bg-amber-700 text-white" : "bg-zinc-800 hover:bg-zinc-700 text-zinc-300")
|
||||
}, sfName);
|
||||
})
|
||||
}),
|
||||
// ── VST Instruments (scanned bởi Plugin Manager) ──
|
||||
(instrumentSelectorData?.vst_instruments?.length > 0) && /*#__PURE__*/React.createElement("div", { className: "mt-3 text-[10px] text-zinc-500 uppercase font-bold px-1 flex items-center gap-1" }, /*#__PURE__*/React.createElement("i", { "data-lucide": "cpu", className: "w-3 h-3 text-violet-400" }), "VST Instruments"),
|
||||
(instrumentSelectorData?.vst_instruments || []).map(v => /*#__PURE__*/React.createElement("button", {
|
||||
key: 'vst_modal_' + (v.id || v.name),
|
||||
onClick: () => { setTrackInstrumentWithUndo(instrumentSelectorTrackId, v.id, v.name || v.id); closeInstrumentSelector(); },
|
||||
className: "w-full text-left px-3 py-2 text-sm rounded bg-zinc-800 hover:bg-violet-800 text-zinc-300 flex items-center justify-between gap-2"
|
||||
}, /*#__PURE__*/React.createElement("span", { className: "truncate" }, v.name || v.id), /*#__PURE__*/React.createElement("span", { className: "text-[9px] text-cyan-400 shrink-0" }, v.type || "VST")))
|
||||
),
|
||||
/*#__PURE__*/React.createElement("div", { className: "flex-1 overflow-y-auto space-y-0.5" },
|
||||
/*#__PURE__*/React.createElement("button", {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"plugin_dirs": ["/tmp/tmpuosmaps4"]}
|
||||
@@ -31,7 +31,7 @@
|
||||
<script src="https://unpkg.com/react@18.3.1/umd/react.production.min.js"></script>
|
||||
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"></script>
|
||||
<script src="/static/js/services/fluidsynthLoader.js?v=202607271245"></script>
|
||||
<script src="/static/js/services/api.js?v=202608091300"></script>
|
||||
<script src="/static/js/services/api.js?v=202608091400"></script>
|
||||
<script src="/static/js/services/audioEngine.js?v=202607271016"></script>
|
||||
<script src="/static/js/services/storage.js?v=202608038200"></script>
|
||||
<script src="/static/js/services/soundfontStorage.js?v=202607271016"></script>
|
||||
@@ -43,7 +43,7 @@
|
||||
<script src="/static/js/services/midiExtractor.js?v=202607281052"></script>
|
||||
<script src="/static/js/services/promptTemplateManager.js?v=202607281039"></script>
|
||||
<script src="/static/js/services/undoRedoEngine.js?v=202607290941"></script>
|
||||
<script src="/static/js/app.precompiled.js?v=202608091300" defer></script>
|
||||
<script src="/static/js/app.precompiled.js?v=202608091400" defer></script>
|
||||
<link rel="stylesheet" href="/static/css/styles.css?v=202607271016">
|
||||
<style>
|
||||
:root {
|
||||
|
||||
Reference in New Issue
Block a user