Skip to content

Force Direct Play: the audio refusal names the codec - #898

Merged
GLinnik21 merged 2 commits into
mainfrom
lane/forced-audio-codec
Oct 22, 2026
Merged

GLinnik21 merged 2 commits into
mainfrom
lane/forced-audio-codec

Conversation

@GLinnik21

Copy link
Copy Markdown
Owner

When Force Direct Play refuses a file because of its audio, the read-out now names the codec ("…this audio (DTS) can't play without conversion") instead of "this audio format". Field reports like the one in discussion #695 and the C1 refusal on Reddit could not tell us which codec hit the wall.

  • ForcedFailure::Audio { codec } and AudioNeedsConversion { codec } carry friendly_codec's name for the track the viewer was going to play (session pick → remembered/selected → language → file default → first track → Media-level acodec). An unknown codec keeps the old generic sentence.
  • Two new keys with {codec} in all 8 locales: widgets.verdict.forced_audio_codec, widgets.verdict.forced_audio_conversion_codec.
  • Both refusal sites log playback_policy: Force Direct Play refused audio codec <raw> (<friendly>), so a log tells dca from dts. Telemetry payload unchanged (it is consent-previewed).
  • PlayVerdict::text() returns Cow<str>; only the two codec sentences allocate, on the failure screen only. ForcedFailure is no longer Copy.

No layout or colour change: the read-out shows the verdict sentence where it already did.

Verification

  • Red first: forced_audio_refusal_names_the_codec (dca → "DTS", truehd → "Dolby TrueHD") failed to compile on main (no codec field), then passed; plus forced_audio_refusal_without_a_codec_keeps_the_generic_sentence.
  • make check on the committed tree: every test result: ok, 0 failed (largest: 1848 passed; 0 failed; 64 ignored). make check-nodef clean.
  • Not done: a ui-sim capture of the read-out; the translations other than English are unreviewed (Belarusian reuses the catalogue's existing wording; Hungarian avoids a suffix on the codec name).

First PR of the DTS/lossless audio plan; the dca spelling fix stacks on this one.

🤖 Generated with Claude Code

GLinnik21 and others added 2 commits October 21, 2026 16:30
ForcedFailure::Audio and AudioNeedsConversion carry the refused track's codec
(friendly_codec, name only), the read-out says "DTS audio can't play without
conversion" instead of "this audio format", and the event log line
playback_policy names the raw codec. Empty codec keeps the generic sentence.
New keys widgets.verdict.forced_audio_codec and forced_audio_conversion_codec
in all 8 locales.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dly name

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@GLinnik21
GLinnik21 merged commit 4ed33e5 into main Oct 22, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the lane/forced-audio-codec branch October 22, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant