fix: prompt for retry_rejected in interactive mode instead of silently applying env var
RETRY_REJECTED was silently read from the environment in _configure_person, bypassing user control in interactive sessions. Now prompts the user with the env var value as the default, so the setting is visible and overridable. All other env vars in the interactive path are already correct: YEARS_FILTER is a prompt default, ONLY_PEOPLE/SKIP_PEOPLE/MIN_FACE_COUNT are auto_configure-only, and TRAINING_MODE/STRATEGY/OBJECT_CLASS are always prompted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -150,8 +150,11 @@ def _configure_person(person: dict, people: list[dict]) -> dict | None:
|
||||
|
||||
rprint(f" Found [bold]{len(all_assets)}[/bold] total, [bold]{len(recent_assets)}[/bold] in range ({years} years).")
|
||||
|
||||
# Filter out assets already uploaded to Frigate
|
||||
retry_rejected = os.environ.get("RETRY_REJECTED", "false").lower() in ("true", "1", "yes")
|
||||
# Filter out assets already uploaded to Frigate.
|
||||
# In interactive mode, ask — use the env var only as the default so it can
|
||||
# still be pre-set (e.g. RETRY_REJECTED=true) without forcing the answer.
|
||||
retry_env = os.environ.get("RETRY_REJECTED", "false").lower() in ("true", "1", "yes")
|
||||
retry_rejected = Confirm.ask("Include previously rejected images?", default=retry_env)
|
||||
before_dedup = len(recent_assets)
|
||||
new_asset_ids = set(filter_already_uploaded([a["id"] for a in recent_assets], retry_rejected=retry_rejected))
|
||||
recent_assets = [a for a in recent_assets if a["id"] in new_asset_ids]
|
||||
|
||||
Reference in New Issue
Block a user