Create a torrentMap
This commit is contained in:
@@ -18,13 +18,13 @@ func createMultiTorrentResponse(basePath string, torrents []torrent.Torrent) (st
|
||||
if item.Progress != 100 {
|
||||
continue
|
||||
}
|
||||
if _, exists := seen[item.Name]; exists {
|
||||
if _, exists := seen[item.AccessKey]; exists {
|
||||
continue
|
||||
}
|
||||
seen[item.Name] = true
|
||||
seen[item.AccessKey] = true
|
||||
|
||||
path := filepath.Join(basePath, url.PathEscape(item.Name))
|
||||
htmlDoc += fmt.Sprintf("<li><a href=\"%s/\">%s</a></li>", path, item.Name)
|
||||
path := filepath.Join(basePath, url.PathEscape(item.AccessKey))
|
||||
htmlDoc += fmt.Sprintf("<li><a href=\"%s/\">%s</a></li>", path, item.AccessKey)
|
||||
}
|
||||
|
||||
return htmlDoc, nil
|
||||
|
||||
Reference in New Issue
Block a user