Skip to content

v1.0.3 — P0 hotfix: BlueIrisUrlTemplate accept {camera_shortname}

Choose a tag to compare

@blehnen blehnen released this 01 May 23:54
· 217 commits to main since this release

P0 hotfix on v1.0.2. The v1.0.2 release shipped the new {camera_shortname} token in EventTokenTemplate.AllowedTokens and updated the README + migration tool to recommend it, but missed updating BlueIrisUrlTemplate's separate AllowedTokens list. Result: any operator who upgraded to v1.0.2 and used {camera_shortname} in their BlueIris.TriggerUrlTemplate (i.e. anyone following the v1.0.2 README) crashed at startup with:

System.ArgumentException: BlueIris.TriggerUrlTemplate contains unknown placeholder '{camera_shortname}'.
Allowed placeholders: {camera}, {label}, {event_id}, {zone}.

BlueIrisUrlTemplate is the per-plugin URL template wrapper for BlueIrisActionPlugin (trigger URL) and BlueIrisSnapshotProvider (snapshot URL); it has its own allowlist separate from EventTokenTemplate's. The PR #33 sweep updated the latter but not the former, and no test exercised the BlueIris parse path against the new token.

Fixed

  • Added "camera_shortname" to BlueIrisUrlTemplate.AllowedTokens and the Resolve switch (with the same IsNullOrWhiteSpace-fall-through-to-Camera logic as EventTokenTemplate). Updated the unknown-token error message to list {camera_shortname} so operators triaging template errors see the new token in the suggestion list. Both BlueIris.TriggerUrlTemplate and BlueIris.SnapshotUrlTemplate use this template type, so one fix covers both.
  • 4 new regression tests in tests/FrigateRelay.Plugins.BlueIris.Tests/BlueIrisUrlTemplateTests.cs covering parse acceptance, override resolution, fall-through when blank, and the error-message contract.

Operator guidance

If you pulled ghcr.io/blehnen/frigaterelay:1.0.2 and hit the crash:

  • Quickest unblock without re-pulling: revert your BlueIris.TriggerUrlTemplate from {camera_shortname} back to {camera}. Host boots, BI triggers go back to silent no-op (same broken state as v1.0.0/v1.0.1) — not worse.
  • Real fix: pull ghcr.io/blehnen/frigaterelay:1.0.3 and restart with {camera_shortname} + CameraShortName set per subscription.

The :1 and :latest rolling tags now point at v1.0.3.