Support filtering by size
This commit is contained in:
@@ -80,6 +80,12 @@ func ServeFilesList(directory, torrentName string, torMgr *torrent.TorrentManage
|
||||
if dirCfg.OnlyShowTheBiggestFile && file.Bytes < biggestFileSize {
|
||||
continue
|
||||
}
|
||||
if dirCfg.OnlyShowFilesWithSizeLte > 0 && file.Bytes > dirCfg.OnlyShowFilesWithSizeLte {
|
||||
continue
|
||||
}
|
||||
if dirCfg.OnlyShowFilesWithSizeGte > 0 && file.Bytes < dirCfg.OnlyShowFilesWithSizeGte {
|
||||
continue
|
||||
}
|
||||
buf.WriteString(dav.File(filename, file.Bytes, file.Ended))
|
||||
}
|
||||
buf.WriteString("</d:multistatus>")
|
||||
|
||||
Reference in New Issue
Block a user