Save sort order and sort column to config.
For sorting by mixed columns ,priored by last selected column for sort, concat list entries to one string and compare them.
For only numbers like rating, fill them up with zeros to a fixed digit number and convert to a string for comparison, so we get higher numbers first in the sort, as they are more important than no rating.