Skip to content

Commit

Permalink
fix qbit category path mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetMnM authored and SweetMnM committed Dec 26, 2022
1 parent 604e7a8 commit 8cd083e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions client/qbittorrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,17 @@ func (c *QBittorrent) LoadLabelPathMap() error {

c.labelPathMap = make(map[string]string)
for _, cat := range cats {
if cat.SavePath != "" {
c.labelPathMap[cat.Name] = cat.SavePath
} else {
if cat.SavePath == "" {
c.labelPathMap[cat.Name] = filepath.Join(p.SavePath, cat.Name)
continue
}

if filepath.IsAbs(cat.SavePath) {
c.labelPathMap[cat.Name] = cat.SavePath
continue
}

c.labelPathMap[cat.Name] = filepath.Join(p.SavePath, cat.SavePath)
}

return nil
Expand Down

0 comments on commit 8cd083e

Please sign in to comment.