[mythtv] Status of Schedules Direct SD-JSON grabbers

Karl Dietz dekarl at spaetfruehstuecken.org
Thu Jul 28 05:55:10 UTC 2016


On 28.07.2016 02:25, Gary Buhrmaster wrote:
> I will have to think a bit.  Stations have no specific order in
> xmltv, but humans seem to have this habit of wanting the
> derived channel number to be in order (but, note, it is not
> a simple sort order, but a "channel" order (as a channel,
> channel 2.4 is before 2.10, but not as a number sort,
> as 2.10 is lower than 2.4), and not as a character sort
> where you get into issues where channels such as
> 1 2 3 10 11 20 turn into 1 10 11 2 20 3, which is not what
> you want either).  Adding in a custom parse and sort will
> require some thought, and whether it can even be done
> efficiently in the current code constructs is unknown.

Sounds like natural sort order (or the specialization we have in our
code for channel numbers)
https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/
http://search.cpan.org/~salva/Sort-Key-1.33/lib/Sort/Key/Natural.pm
http://search.cpan.org/~bingos/Sort-Naturally-1.03/lib/Sort/Naturally.pm

Regards,
Karl


More information about the mythtv-dev mailing list