# `Laev.FilePick`
[🔗](https://github.com/alexdont/laev/blob/main/lib/laev/file_pick.ex#L1)

Choosing the right video file inside a torrent — shared by every debrid
provider. Files come in as maps with `"path"` and `"bytes"` (plus whatever
provider-specific keys the caller wants back, e.g. `"id"`).

# `choose`

Pick the file to play: the only video, the requested episode from a
batch/season pack, or the largest video. `{:ok, file}` or
`{:error, :no_video_files}`.

# `names_episode?`

Does this file actually hold the episode asked for?

`choose/3` falls back to the largest file when nothing matches, which is right
when a release is one episode named anything — and wrong as an answer to "is
episode 13 in this pack?". Anything reusing a pack has to ask this instead, or
it will happily play episode 1 again and call it 13.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
