Add debug symbols
This commit is contained in:
@@ -72,20 +72,10 @@ func handleListTorrents(w http.ResponseWriter, requestPath string, t *torrent.To
|
||||
// initial response is the directory itself
|
||||
fmt.Fprint(w, dav.BaseDirectory(basePath, ""))
|
||||
|
||||
var allTorrents []torrent.Torrent
|
||||
torrents.IterCb(func(key string, tor *torrent.Torrent) {
|
||||
if tor.AllInProgress() {
|
||||
return
|
||||
}
|
||||
copy := *tor
|
||||
copy.AccessKey = key
|
||||
allTorrents = append(allTorrents, copy)
|
||||
})
|
||||
sort.Slice(allTorrents, func(i, j int) bool {
|
||||
return allTorrents[i].AccessKey < allTorrents[j].AccessKey
|
||||
})
|
||||
|
||||
for _, tor := range allTorrents {
|
||||
allTorrents := torrents.Keys()
|
||||
sort.Strings(allTorrents)
|
||||
for _, accessKey := range allTorrents {
|
||||
tor, _ := torrents.Get(accessKey)
|
||||
fmt.Fprint(w, dav.Directory(tor.AccessKey, tor.LatestAdded))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user