src/epg.c:2607-2610 — `_epg_sort_channel_descending` delegates to
`_epg_sort_description_ascending` and negates, so a request for
channel-name DESC returns events ordered by reverse description
text instead of reverse channel name. Rows cluster by adjacent
description prose, not by channel.
The sibling `_epg_sort_channel_ascending` (lines 2598-2605) uses
`channel_get_name` correctly, and every other `_descending`
variant in the file delegates to its own `_ascending` (title,
subtitle, summary, description, extratext, genre). Channel is
the only outlier — a copy-paste typo.
Fix: delegate to `_epg_sort_channel_ascending`.
Verifiable via:
curl 'http://<host>/api/epg/events/grid?sort=channelName&dir=DESC&limit=20'
Pre-fix: rows interleave by description text. Post-fix: rows
cluster by channel in reverse alphabetical order.
Signed-off-by: Oliver Sluke <22557015+oliversluke@users.noreply.github.com>
static int _epg_sort_channel_descending ( const void *a, const void *b, void *eq )
{
- return _epg_sort_description_ascending(a, b, eq) * -1;
+ return _epg_sort_channel_ascending(a, b, eq) * -1;
}
static int _epg_sort_channel_num_ascending ( const void *a, const void *b, void *eq )