Readd downloads mount
This commit is contained in:
@@ -23,7 +23,7 @@ func ServeRootDirectoryForInfuse(torMgr *torrent.TorrentManager) ([]byte, error)
|
||||
}
|
||||
buf.WriteString(dav.BaseDirectory(directory, ""))
|
||||
}
|
||||
if torMgr.Config.GetConfig().UseDownloadCache {
|
||||
if torMgr.Config.EnableDownloadMount() {
|
||||
buf.WriteString(dav.BaseDirectory(config.DOWNLOADS, ""))
|
||||
}
|
||||
_, size := version.GetFile()
|
||||
@@ -95,7 +95,7 @@ func ServeFilesListForInfuse(directory, torrentName string, torMgr *torrent.Torr
|
||||
|
||||
func ServeDownloadsListForInfuse(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
var buf bytes.Buffer
|
||||
if !torMgr.Config.GetConfig().UseDownloadCache {
|
||||
if !torMgr.Config.EnableDownloadMount() {
|
||||
buf.WriteString("Enable download cache in config to use this feature")
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
}
|
||||
buf.WriteString(dav.Directory(directory, ""))
|
||||
}
|
||||
if torMgr.Config.GetConfig().UseDownloadCache {
|
||||
if torMgr.Config.EnableDownloadMount() {
|
||||
buf.WriteString(dav.Directory(config.DOWNLOADS, ""))
|
||||
}
|
||||
_, size := version.GetFile()
|
||||
@@ -121,7 +121,7 @@ func HandleSingleFile(directory, torrentName, fileName string, torMgr *torrent.T
|
||||
|
||||
func ServeDownloadsList(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
var buf bytes.Buffer
|
||||
if !torMgr.Config.GetConfig().UseDownloadCache {
|
||||
if !torMgr.Config.EnableDownloadMount() {
|
||||
buf.WriteString("Enable download cache in config to use this feature")
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user