Remove download mount config, it is now always enabled
This commit is contained in:
@@ -26,9 +26,7 @@ func ServeRootDirectoryForInfuse(torMgr *torrent.TorrentManager) ([]byte, error)
|
||||
buf.WriteString(dav.BaseDirectory(directory, ""))
|
||||
}
|
||||
|
||||
if torMgr.Config.EnableDownloadMount() {
|
||||
buf.WriteString(dav.BaseDirectory(config.DOWNLOADS, ""))
|
||||
}
|
||||
buf.WriteString(dav.BaseDirectory(config.DOWNLOADS, ""))
|
||||
|
||||
_, size := version.GetFile()
|
||||
buf.WriteString(dav.File(version.FILE, size, ""))
|
||||
@@ -108,10 +106,6 @@ func ServeFilesListForInfuse(directory, torrentName string, torMgr *torrent.Torr
|
||||
|
||||
func ServeDownloadsListForInfuse(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("<?xml version=\"1.0\" encoding=\"utf-8\"?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
|
||||
@@ -120,7 +114,7 @@ func ServeDownloadsListForInfuse(torMgr *torrent.TorrentManager) ([]byte, error)
|
||||
|
||||
for _, filename := range filenames {
|
||||
download, ok := torMgr.DownloadMap.Get(filename)
|
||||
if !ok {
|
||||
if !ok || strings.HasPrefix(download.Link, "https://real-debrid.com/d/") {
|
||||
continue
|
||||
}
|
||||
buf.WriteString(dav.File(download.Filename, download.Filesize, download.Generated))
|
||||
|
||||
Reference in New Issue
Block a user