Skip to main content

served_audio_codec

Function served_audio_codec 

Source
pub async fn served_audio_codec(
    repo: &dyn MediaRepository,
    item_id: &str,
) -> Option<String>
Expand description

The audio codec the server would serve for item_id — the default track, or the first when none is marked, matching the track Jellyfin picks.

None when the item has no audio, names no codec, or cannot be fetched. A caller must read that as “unknown”, never as “fine”: it is the input to a policy that only adds a transcode, so an unknown codec leaves behaviour exactly as it was.

TRACES: UR-071 | DR-171 | UT-166