diff --git a/bincio/extract/cli.py b/bincio/extract/cli.py index 4a5fee7..5a5d1ba 100644 --- a/bincio/extract/cli.py +++ b/bincio/extract/cli.py @@ -76,8 +76,7 @@ def _process_file(path: Path) -> dict: try: metrics = compute(activity) - activity_id = make_activity_id(activity) - write_activity( + activity_id = write_activity( activity, metrics, _output_dir, privacy=_privacy, rdp_epsilon=_rdp_epsilon, diff --git a/bincio/extract/writer.py b/bincio/extract/writer.py index 143e951..ed1c7e0 100644 --- a/bincio/extract/writer.py +++ b/bincio/extract/writer.py @@ -90,6 +90,7 @@ def write_activity( if existing.get("source_hash") != activity.source_hash: activity_id = f"{activity_id}-{activity.source_hash[-6:]}" json_path = acts_dir / f"{activity_id}.json" + detail["id"] = activity_id json_path.write_text(json.dumps(detail, indent=2, ensure_ascii=False)) # ── GeoJSON track ──────────────────────────────────────────────────────── diff --git a/schema/bas-v1.schema.json b/schema/bas-v1.schema.json index 43c38d8..874322d 100644 --- a/schema/bas-v1.schema.json +++ b/schema/bas-v1.schema.json @@ -122,7 +122,8 @@ "minItems": 2, "maxItems": 2 } - } + }, + "custom": { "type": "object" } }, "additionalProperties": false } diff --git a/site/src/components/EditDrawer.svelte b/site/src/components/EditDrawer.svelte index 56e1961..e2ba5c5 100644 --- a/site/src/components/EditDrawer.svelte +++ b/site/src/components/EditDrawer.svelte @@ -98,7 +98,8 @@ } } } catch (e: any) { - error = `Upload failed: ${e.message}`; + saveStatus = `Upload failed: ${e.message}`; + saveOk = false; } finally { uploading = false; }