Remove download mount config, it is now always enabled
This commit is contained in:
@@ -17,9 +17,7 @@ func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("<ol>")
|
||||
directories := torMgr.DirectoryMap.Keys()
|
||||
if torMgr.Config.EnableDownloadMount() {
|
||||
directories = append(directories, config.DOWNLOADS)
|
||||
}
|
||||
directories = append(directories, config.DOWNLOADS)
|
||||
sort.Strings(directories)
|
||||
for _, directory := range directories {
|
||||
if strings.HasPrefix(directory, "int__") {
|
||||
@@ -95,16 +93,12 @@ func ServeFilesList(directory, torrentName string, torMgr *torrent.TorrentManage
|
||||
|
||||
func ServeDownloadsList(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
var buf bytes.Buffer
|
||||
if !torMgr.Config.EnableDownloadMount() {
|
||||
buf.WriteString("Enable download mount in config to use this feature")
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
buf.WriteString("<ol>")
|
||||
filenames := torMgr.DownloadMap.Keys()
|
||||
sort.Strings(filenames)
|
||||
for _, filename := range filenames {
|
||||
download, ok := torMgr.DownloadMap.Get(filename)
|
||||
if !ok {
|
||||
if !ok || strings.HasPrefix(download.Link, "https://real-debrid.com/d/") {
|
||||
continue
|
||||
}
|
||||
filePath := filepath.Join(config.DOWNLOADS, url.PathEscape(filename))
|
||||
|
||||
Reference in New Issue
Block a user