diff --git a/src/util/util.cr b/src/util/util.cr index 9f5ffee..7278bb2 100644 --- a/src/util/util.cr +++ b/src/util/util.cr @@ -98,6 +98,8 @@ def sort_titles(titles : Array(Title), opt : SortOptions, username : String) (a.load_percentage(username) <=> b.load_percentage(username)).or \ compare_numerically a.title, b.title end + when .title? + ary.sort! { |a, b| compare_numerically a.title, b.title } else unless opt.method.auto? Logger.warn "Unknown sorting method #{opt.not_nil!.method}. Using " \ diff --git a/src/views/library.html.ecr b/src/views/library.html.ecr index 39e9856..a5e8b59 100644 --- a/src/views/library.html.ecr +++ b/src/views/library.html.ecr @@ -10,6 +10,7 @@