This commit is contained in:
Ben Sarmiento
2024-05-23 19:29:16 +02:00
parent 2a5f12e37f
commit d03b59bb2a
10 changed files with 275 additions and 226 deletions

View File

@@ -45,7 +45,7 @@ func ServeTorrentsList(directory string, torMgr *torrent.TorrentManager) ([]byte
sort.Strings(torrentNames)
for _, torrentName := range torrentNames {
tor, ok := torrents.Get(torrentName)
if !ok || tor.AllInProgress() {
if !ok {
continue
}
buf.WriteString(fmt.Sprintf("<li><a href=\"/http/%s/\">%s</a></li>", filepath.Join(directory, url.PathEscape(torMgr.GetKey(tor))), torMgr.GetKey(tor)))