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 |
condition |
Condition |
No | Only clients field is allowed in sort condition |
GroupByRule
| Field | Type | Required | Description |
|---|---|---|---|
selector |
Selector |
Yes | How to group (attribute/tag) |
group_order |
[]regex |
No | Custom order of groups, regex patterns |
How It Works
- If
group_byis set, channels are grouped bygroup_by.selector. - Channel or group order is determined by the corresponding
orderarrays (if present). - Within each group (or globally), regex
orderis 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: