FIX: sửa lỗi không load instrument của soundfont trên window

This commit is contained in:
2026-08-10 10:04:54 +07:00
parent 85ac80bb4f
commit 1db892bb99
8 changed files with 160 additions and 4 deletions
+6
View File
@@ -287,6 +287,12 @@ class PluginManager:
search_dirs.append(self.sf_dir)
if self.upload_sf_dir and os.path.isdir(self.upload_sf_dir) and self.upload_sf_dir != self.sf_dir:
search_dirs.append(self.upload_sf_dir)
# Thư mục user thêm qua Plugin Manager (plugin_dirs — chứa cả VST lẫn
# SoundFont): nếu không có, instrument của soundfont trong thư mục user
# không liệt kê được (bug "nhấn tên SF không thấy instrument").
for d in (self.extra_vst_dirs or []):
if d and os.path.isdir(d) and d not in search_dirs:
search_dirs.append(d)
for d in search_dirs:
for f in os.listdir(d):
if not (f.endswith(".sf2") or f.endswith(".sf3")):