Skip to content

Grouping

Groups profile files by lineage: each source video (or standalone file) becomes a head with its derived variants (generated / fixed SRTs, converted MP4) nested under it. Shared by the Files panel and the player's Load Media popover.

Type Aliases

VideoGroup

type VideoGroup = object;

Defined in: src/features/profile/grouping.ts:12

A source file (head) with its derived variants nested under it.

Properties

Property Type Defined in
head ProfileFile src/features/profile/grouping.ts:12
variants ProfileFile[] src/features/profile/grouping.ts:12

Functions

buildFileGroups()

function buildFileGroups(files): VideoGroup[];

Defined in: src/features/profile/grouping.ts:38

Groups files into source heads with their derived variants nested under them.

A head is a root file (no source_file_id) or a dangling derivative whose source is no longer in the set (its source was deleted). Every other file is a variant sorted under its head.

Parameters

Parameter Type Description
files ProfileFile[] The files to group.

Returns

VideoGroup[]

One group per head, in the input head order.


fileKind()

function fileKind(f): "video" | "srt" | "audio" | "other";

Defined in: src/features/profile/grouping.ts:23

The media class of a file, from its extension (matches the player).

Parameters

Parameter Type
f ProfileFile

Returns

"video" | "srt" | "audio" | "other"