Rename and only return 404 when not found
This commit is contained in:
@@ -51,7 +51,7 @@ func ServeGroupDirectory(directory string, torMgr *torrent.TorrentManager) ([]by
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func ServeFilesList(directory, torrentName string, torMgr *torrent.TorrentManager, shouldHideBrokenTorrents bool) ([]byte, error) {
|
||||
func ServeTorrentFiles(directory, torrentName string, torMgr *torrent.TorrentManager, shouldHideBrokenTorrents bool) ([]byte, error) {
|
||||
torrents, ok := torMgr.DirectoryMap.Get(directory)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("cannot find directory %s", directory)
|
||||
@@ -94,7 +94,7 @@ func ServeFilesList(directory, torrentName string, torMgr *torrent.TorrentManage
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func ServeDownloadsList(_ string, torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
func ServeDownloads(_ string, torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("<ol>")
|
||||
filenames := torMgr.DownloadMap.Keys()
|
||||
|
||||
Reference in New Issue
Block a user