File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ CLI tool to run upload/sync jobs with rclone.
1515rclone :
1616 config : /home/seed/.config/rclone/rclone.conf
1717 path : /usr/bin/rclone
18+ stats : 30s
1819uploader :
1920 google :
2021 check :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package config
33type RcloneConfig struct {
44 Path string
55 Config string
6+ Stats string
67 DryRun bool `mapstructure:"dry_run"`
78}
89
Original file line number Diff line number Diff line change 11package rclone
22
33import (
4+ "github.com/l3uddz/crop/config"
45 "github.com/l3uddz/crop/pathutils"
56)
67
@@ -20,13 +21,18 @@ func getBaseParams() ([]string, error) {
2021 "--config" , cfg .Rclone .Config ,
2122 // verbose
2223 "-v" ,
23- // stats
24- "--stats" , "30s" ,
2524 // user-agent
2625 "--user-agent" , "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) " +
2726 "Chrome/74.0.3729.131 Safari/537.36" ,
2827 )
2928
29+ // add stats
30+ if config .Config .Rclone .Stats != "" {
31+ params = append (params ,
32+ // stats
33+ "--stats" , "30s" )
34+ }
35+
3036 return params , nil
3137}
3238
You can’t perform that action at this time.
0 commit comments