Skip to content

Commit c8c7479

Browse files
committed
[toru] sort multi-episode torrents in reverse so newest is first - thanks to EnergoStalin #22 (comment)
1 parent a026990 commit c8c7479

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/toru/search.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,12 @@ func fzfMain() (string, error) {
205205
}
206206

207207
func fzfEpisodes(m []*torrent.File) (string, error) {
208+
l := len(m) - 1
208209
idx, err := fzf.Find(
209210
m,
210211
func(i int) string {
211-
fpath := m[i].DisplayPath()
212+
// fpath := m[i].DisplayPath()
213+
fpath := m[l-i].DisplayPath()
212214
return fpath
213215
},
214216
)

0 commit comments

Comments
 (0)