Improve info when config is reloaded. (#16)
- Using toasts as message outputs (still a lot of room for improvement) Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
This commit is contained in:
parent
0e2288565d
commit
ab7d379408
6 changed files with 83 additions and 59 deletions
cmd/distribyted
|
@ -103,13 +103,12 @@ func load(configPath string, port int) error {
|
|||
|
||||
for _, mp := range c.MountPoints {
|
||||
ef(fmt.Sprintf("mounting %v with %d torrents...", mp.Path, len(mp.Torrents)))
|
||||
if err := mountService.Mount(mp); err != nil {
|
||||
if err := mountService.Mount(mp, ef); err != nil {
|
||||
return fmt.Errorf("error mounting folder %v: %w", mp.Path, err)
|
||||
}
|
||||
ef(fmt.Sprintf("%v mounted", mp.Path))
|
||||
}
|
||||
|
||||
ef("all OK")
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue