#1303 closed enhancement (fixed)
configuration - sort order
Reported by: | backup | Owned by: | zzz |
---|---|---|---|
Priority: | trivial | Milestone: | 0.9.23 |
Component: | apps/i2psnark | Version: | 0.9.13 |
Keywords: | configuration | Cc: | |
Parent Tickets: | Sensitive: | no |
Description
Current sort order of torrents displayed is "intelligent", "The AA Movie" is sorted on top in the torrent list.
My desktop file manager display in "normal order", so it would be nice having a setting in i2psnark,
- sort order: "intelligent" or "normal"
Subtickets
Change History (5)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Thanks for the comment. #637 is about how intelligent the sort algo has to be (to satisfy all user and languages).
My proposed enhancement is a setting "turn-off" the intelligent sort algo completely and fallback to "normal" sorting (one by one character), like it was in older snark version.
This would satisfy users with non-english torrents, or users like me who are confused because desktop filemanager sorts the other way.
BR backup
comment:3 Changed 7 years ago by
proposal:
I2PSnarkServlet.java // new Option: out.write(_("Sort order")); // "advanced" | "normal" _manager.getSortOrder() private static class TorrentNameComparator implements Comparator<Snark>, Serializable { ... String ls = l.getBaseName(); String rs = r.getBaseName(); if (getSortOrder=="advanced") { // EN if (llc.startsWith("the ") || llc.startsWith("the.") || llc.startsWith("the_")) ls = ls.substring(4); if (rlc.startsWith("the ") || rlc.startsWith("the.") || rlc.startsWith("the_")) rs = rs.substring(4); if (llc.startsWith("a ") || llc.startsWith("a.") || llc.startsWith("a_")) ls = ls.substring(2); if (rlc.startsWith("a ") || rlc.startsWith("a.") || rlc.startsWith("a_")) rs = rs.substring(2); // DE if (llc.startsWith("der ") || llc.startsWith("der.") || llc.startsWith("der_") || llc.startsWith("die ") || llc.startsWith("die.") || llc.startsWith("die_") || llc.startsWith("das ") || llc.startsWith("das.") || llc.startsWith("das_") || llc.startsWith("ein ") || llc.startsWith("ein.") || llc.startsWith("ein_")) ls = ls.substring(4); if (rlc.startsWith("der ") || rlc.startsWith("der.") || rlc.startsWith("der_") || rlc.startsWith("die ") || rlc.startsWith("die.") || rlc.startsWith("die_") || rlc.startsWith("das ") || rlc.startsWith("das.") || rlc.startsWith("das_") || rlc.startsWith("ein ") || rlc.startsWith("ein.") || rlc.startsWith("ein_")) rs = rs.substring(4); } return Collator.getInstance().compare(ls, rs);
BR backup
comment:4 Changed 5 years ago by
Milestone: | → 0.9.23 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
- Added 'smart sort' option, on by default
- Smart sort is based on keywords for configured language only; added keywords for 7 common languages including Deutsch
- Moved implementation to Pattern/Matcher? for efficiency
In a1a907334db43730fd0fa57c62704fe86d978275 0.9.22-18
Essentially a dup of #637