Settings: per-user default for download_disabled

New pref download_disabled_default (stored in user_prefs + mirrored to
_user_settings.json for the render pipeline). When true, apply_sidecar
marks all activities as download_disabled unless the sidecar explicitly
sets download_disabled: false (per-activity opt-in from the edit drawer).

Settings page gets an "Activity defaults" card with the toggle.
This commit is contained in:
Davide Scaini
2026-05-16 20:51:23 +02:00
parent 2d9620c6d1
commit de602ff5d9
4 changed files with 79 additions and 5 deletions
+5 -1
View File
@@ -50,8 +50,12 @@ def apply_sidecar_edit(activity_id: str, payload: dict[str, Any], data_dir: Path
hide = [s for s in (payload.get("hide_stats") or []) if s in STAT_PANELS]
if hide:
lines.append(f"hide_stats: [{', '.join(hide)}]")
if payload.get("download_disabled"):
dd = payload.get("download_disabled")
if dd is True:
lines.append("download_disabled: true")
elif dd is False:
# Explicit false: allows per-activity opt-in against a user-level default
lines.append("download_disabled: false")
description = (payload.get("description") or "").strip()