Sort Playlist Rule
The sort
rule controls the ordering of channels in a playlist, optionally grouping by any channel field.
YAML Structure
Fields
Field | Type | Required | Description |
---|---|---|---|
selector | Selector |
No | Property to use for sorting (attribute/tag/etc), default is name |
order | []regex |
No | Custom order of channels, regex patterns |
group_by | GroupByRule |
No | Group before sorting |
GroupByRule
Field | Type | Required | Description |
---|---|---|---|
selector | Selector |
Yes | How to group (attribute/tag) |
order | []regex |
No | Custom order of groups, regex patterns |
How It Works
- If
group_by
is set, channels are grouped bygroup_by.selector
. - Channel or group order is determined by the corresponding
order
arrays (if present). - Within each group (or globally), regex
order
is applied in order. Unmatched go at the end. - Channels within the same priority are alphabetically sorted by name/selector value.
Examples
Simple alphabetical sort:
Sort by attribute, move News and Children groups to the top: