zipleen / tvheadend-iphone-client

TvhClient - An iOS (iPhone / iPad) client for TVHeadend
http://tvhclient.com/
Mozilla Public License 2.0
113 stars 25 forks source link

Sorting in Guide seems wrong... #191

Open maurymarkowitz opened 7 years ago

maurymarkowitz commented 7 years ago

A picture is worth 1000 words... note the ordering of the channels, especially for 49.

img_1535

zipleen commented 7 years ago

This is actually handled by https://github.com/zipleen/tvheadend-ios-lib/blob/tvOS/tvheadend-ios-lib/TVHEpgStoreAbstract.m#L120 which in itself uses compareByName and compareByNumber in https://github.com/zipleen/tvheadend-ios-lib/blob/tvOS/tvheadend-ios-lib/TVHChannel.m#L288 . It has a unit test in https://github.com/zipleen/tvheadend-ios-lib/blob/tvOS/tvheadend-ios-libTests/TVHChannelTests.m#L113 for compareByNumber, if you want you can add a unit test for compareByName and try to fix it =)

zipleen commented 6 years ago

Now that I think about it, did you put those numbers inside the actual channel name? That's not going to work well! lol

Move those numbers to the actual number, you now have an option to show channel numbers :P (although I have no idea if the 23.2 / 23.1 will compare correctly, but you can try:P)