fix: preserve block_id across save/load and API save_preset/save_snapshot endpoints
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
This commit is contained in:
@@ -59,6 +59,7 @@ def _preset_to_dict(preset: Preset) -> dict:
|
||||
"params": dict(block.params),
|
||||
"nam_model_path": block.nam_model_path,
|
||||
"ir_file_path": block.ir_file_path,
|
||||
"block_id": block.block_id,
|
||||
}
|
||||
for block in preset.chain
|
||||
],
|
||||
@@ -83,6 +84,7 @@ def _preset_to_dict(preset: Preset) -> dict:
|
||||
"params": dict(block.params),
|
||||
"nam_model_path": block.nam_model_path,
|
||||
"ir_file_path": block.ir_file_path,
|
||||
"block_id": block.block_id,
|
||||
}
|
||||
for block in snap.chain
|
||||
],
|
||||
|
||||
@@ -634,6 +634,7 @@ class WebServer:
|
||||
params=b.get("params", {}),
|
||||
nam_model_path=b.get("nam_model_path", ""),
|
||||
ir_file_path=b.get("ir_file_path", ""),
|
||||
block_id=b.get("block_id", ""),
|
||||
))
|
||||
preset = Preset(
|
||||
name=data.get("name", f"Preset {bank}-{program}"),
|
||||
@@ -752,6 +753,7 @@ class WebServer:
|
||||
params=dict(bd.get("params", {})),
|
||||
nam_model_path=bd.get("nam_model_path", ""),
|
||||
ir_file_path=bd.get("ir_file_path", ""),
|
||||
block_id=bd.get("block_id", ""),
|
||||
)
|
||||
)
|
||||
preset.snapshots[slot] = SnapModel(
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ui</title>
|
||||
<script type="module" crossorigin src="/ui/assets/index-jhtO2NOz.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/ui/assets/index-D3aC6klh.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user