Clean up grouping logic
This commit is contained in:
@@ -23,9 +23,9 @@ func findAllTorrentsWithName(t *torrent.TorrentManager, directory, torrentName s
|
||||
var matchingTorrents []torrent.Torrent
|
||||
|
||||
torrents := t.GetByDirectory(directory)
|
||||
for _, torrent := range torrents {
|
||||
if torrent.Name == torrentName || strings.HasPrefix(torrent.Name, torrentName) {
|
||||
matchingTorrents = append(matchingTorrents, torrent)
|
||||
for i := range torrents {
|
||||
if torrents[i].Name == torrentName || strings.HasPrefix(torrents[i].Name, torrentName) {
|
||||
matchingTorrents = append(matchingTorrents, torrents[i])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user