Reimplement deletes and marking files as broken
This commit is contained in:
@@ -74,8 +74,8 @@ func ServeFilesList(directory, torrentName string, torMgr *torrent.TorrentManage
|
||||
filenames := tor.SelectedFiles.Keys()
|
||||
sort.Strings(filenames)
|
||||
for _, filename := range filenames {
|
||||
file, ok := tor.SelectedFiles.Get(filename)
|
||||
if !ok || !strings.HasPrefix(file.Link, "http") {
|
||||
file, _ := tor.SelectedFiles.Get(filename)
|
||||
if file.IsDeleted {
|
||||
continue
|
||||
}
|
||||
if dirCfg.OnlyShowTheBiggestFile && file.Bytes < biggestFileSize {
|
||||
@@ -104,7 +104,7 @@ func ServeDownloadsList(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
sort.Strings(filenames)
|
||||
for _, filename := range filenames {
|
||||
download, ok := torMgr.DownloadMap.Get(filename)
|
||||
if !ok || !strings.HasPrefix(download.Link, "http") {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
filePath := filepath.Join(config.DOWNLOADS, url.PathEscape(filename))
|
||||
|
||||
Reference in New Issue
Block a user