Create a torrentMap
This commit is contained in:
@@ -18,12 +18,12 @@ func createMultiTorrentResponse(basePath string, torrents []torrent.Torrent) (*d
|
||||
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, item.Name)
|
||||
path := filepath.Join(basePath, item.AccessKey)
|
||||
responses = append(responses, dav.Directory(path))
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ func createSingleTorrentResponse(basePath string, torrents []torrent.Torrent) (*
|
||||
var responses []dav.Response
|
||||
|
||||
// initial response is the directory itself
|
||||
currentPath := filepath.Join(basePath, torrents[0].Name)
|
||||
currentPath := filepath.Join(basePath, torrents[0].AccessKey)
|
||||
responses = append(responses, dav.Directory(currentPath))
|
||||
|
||||
finalName := make(map[string]bool)
|
||||
|
||||
Reference in New Issue
Block a user