sorcerersr / urtsb

Automatically exported from code.google.com/p/urtsb
GNU General Public License v3.0
0 stars 0 forks source link

Sorting by players incorrectly #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Launch UrTSB
2. Load a list of servers
3. Sort by "Players"

What is the expected output? What do you see instead?
A server with for example 11 players should be sorted after 9 and 10, not along 
with servers with just 1 player. The sort mechanism isn't accounting for more 
than one digit of players for sorting.

What version of the product are you using? On what operating system?
UrTSB v.0.4 on Ubuntu 10.10

Please provide any additional information below.

Original issue reported on code.google.com by pheonix7...@gmail.com on 4 Dec 2010 at 1:30

Attachments:

GoogleCodeExporter commented 9 years ago
the sorting algorithm seems to be evaluating the whole string consisting of 
"$actualplayers/$maxplayers", but seems to ignore or strip the slash.

Original comment by ZyanK...@gmail.com on 27 Feb 2011 at 8:38

GoogleCodeExporter commented 9 years ago
Where's the bug located? file/line number

Original comment by pheonix7...@gmail.com on 27 Feb 2011 at 8:58

GoogleCodeExporter commented 9 years ago
I fixed this issue. My patched file is attached ( ui/serverlist.py ).
Notably, lines 229 - 247. What I did is if sorting on column five (the column 
displaying $actualplayers/$maxplayers, I had it use my custom sorting method 
called player_sorter that strips out the string before the slash ('/') and 
compares its integer value to the next item's. Tested it briefly and it seems 
to work. I hope it can make its way into the main trunk! :-)

Original comment by pheonix7...@gmail.com on 14 Apr 2011 at 1:00

Attachments:

GoogleCodeExporter commented 9 years ago
fixed with r202

Original comment by SorcererSR@googlemail.com on 14 May 2011 at 1:21

GoogleCodeExporter commented 9 years ago
Issue 6 has been merged into this issue.

Original comment by SorcererSR@googlemail.com on 3 Jun 2011 at 5:16