Simple string sort on listing torrents

This commit is contained in:
Ben Sarmiento
2023-12-12 00:38:17 +01:00
parent ed903c8943
commit 2a1bc59300
6 changed files with 26 additions and 28 deletions

View File

@@ -58,7 +58,10 @@ func (t *TorrentManager) RefreshTorrents() []string {
// torrents yet to be assigned in a directory
strset.Difference(freshKeys, t.allAccessKeys).Each(func(accessKey string) bool {
// assign to directories
tor, _ := allTorrents.Get(accessKey)
tor, ok := allTorrents.Get(accessKey)
if !ok {
return true
}
var directories []string
t.assignedDirectoryCb(tor, func(directory string) {
if strings.HasPrefix(directory, "int__") {