Use sorted_titles

This commit is contained in:
Leeingnyo
2021-12-26 00:27:00 +09:00
parent 234b29bbdd
commit 8fea35fa51
3 changed files with 12 additions and 2 deletions
+6
View File
@@ -61,9 +61,15 @@ struct MainRouter
sort_opt = SortOptions.from_info_json title.dir, username
get_and_save_sort_opt title.dir
sorted_titles = title.sorted_titles username, sort_opt
entries = title.sorted_entries username, sort_opt
percentage = title.load_percentage_for_all_entries username, sort_opt
title_percentage = title.titles.map &.load_percentage username
title_percentage_map = {} of String => Float64
title_percentage.each_with_index do |percentage, i|
t = title.titles[i]
title_percentage_map[t.id] = percentage
end
layout "title"
rescue e