Fix filenames on webdav issue

This commit is contained in:
Ben Sarmiento
2023-11-18 17:16:09 +01:00
parent e85109bcf3
commit c520b5572f
3 changed files with 17 additions and 36 deletions

View File

@@ -26,7 +26,6 @@ type TorrentManager struct {
checksum string
api *realdebrid.RealDebrid
workerPool chan bool
mu *sync.Mutex
log *zap.SugaredLogger
}
@@ -40,7 +39,6 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid) *
requiredVersion: "10.11.2023",
api: api,
workerPool: make(chan bool, cfg.GetNumOfWorkers()),
mu: &sync.Mutex{},
log: logutil.NewLogger().Named("manager"),
}
@@ -99,11 +97,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid) *
}
// get filenames
var filenames []string
torrent.SelectedFiles.IterCb(func(_ string, file *File) {
filenames = append(filenames, file.Path)
})
filenames := torrent.SelectedFiles.Keys()
// Map torrents to directories
switch t.cfg.GetVersion() {
case "v1":