I've noticed some discrepancies with how channel numbers are sorted within Channels depending upon the platform. While I'm sure this is an edge case, I think it might occur more often than is realized. Also, this is only noticed when one uses different numbering schemes—whole numbers for cable channels, decimal numbers for OTA broadcast channels, some other format for Custom Channels.
While setting up a Channels instance for my parents, I used Custom Channels to mimic their existing DirecTV lineup. For sub-/alternate channels, DirecTV uses dash (“-”) notation. For example: TNT (Eastern/national) is 245, but the Pacific feed is 245-1; NESN is 628, NESN+ is 628-1. When checking the lineups in the iOS/iPadOS apps, the channels were sorted as one would expect: 245, 245-1, 628, 628-1. However, both the Android app and the DVR's web UI sorted the alternate channels first: 245-1, 628-1, 245, 628.
Likewise, the sorting for dot (“.”) notation channels differs between Apple clients and both the Android clients and web UI. One would expect the integer number (3) to be sorted before any sub-channels (3.2); this is how it is sorted on the Apple clients. However, the opposite is true for Android/web UI. Extending the metaphor for DirecTV numbering: local OTA broadcasts of NBC include 2 channels: 4.1 NBC, and 4.2 Cozi TV; the DirecTV numbering just has NBC on 4. To incorporate a cable/TVE feed in the lineup with OTA numbers, one would then expect: 4, 4.1, 4.2 (which is what happens with Apple clients). But, Android clients and the web UI show lineup as: 4.1, 4.2, 4.
Is there a different Unicode/collation library being used between platforms (Apple/Android/server)? Does the server's collation come from the host system, or does it use Golang's string libraries? Is there something else that might account for the different sorting between platforms?
I know this is an edge-case, and not really a showstopper of a bug. But it certainly is a papercut, and does make consistency between platforms problematic. (In my situation, to alleviate confusion I simply reduced all channel numbers to whole integers, and reassigned sub-/alternate channels to other numbers. While that worked in my case, it is a bandaid, and not a genuine solution.)



