Audio / subtitle languages of a resolved stream.
Release names only hint at audio ("Rus-Eng", "MULTi") and say nothing
about subtitles, so the picker used to guess. Real-Debrid's
/streaming/mediaInfos reads the actual container server-side and lists
every track with an ISO 639-2 code; this module folds that answer into
%{audio: ["ru", "en"], subs: ["ru"]} — the two-letter codes the rest of
laev already speaks (Laev.Config.lang/0, Torrentio flags) — and renders it
for the source row.
Summary
Functions
%{audio: [..], subs: [..]} from a mediaInfos body: two-letter codes in
container order, deduped, undetermined tracks dropped. Never fails —
a body without details yields empty lists.
Row suffix like 🔊ru·en 💬ru; sections with nothing known are left out,
so a stream with no track info renders as "".
Codes safe to rank on: Laev.Config.lang/0 / Laev.Config.subs_lang/0 are
two-letter, so a 639-2 code we couldn't fold ("pob") would never match
and must not sink a release — it stays visible in the row, that's all.
Functions
%{audio: [..], subs: [..]} from a mediaInfos body: two-letter codes in
container order, deduped, undetermined tracks dropped. Never fails —
a body without details yields empty lists.
Row suffix like 🔊ru·en 💬ru; sections with nothing known are left out,
so a stream with no track info renders as "".
Codes safe to rank on: Laev.Config.lang/0 / Laev.Config.subs_lang/0 are
two-letter, so a 639-2 code we couldn't fold ("pob") would never match
and must not sink a release — it stays visible in the row, that's all.