diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-06-27 18:52:38 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-06-27 18:52:38 (GMT) |
commit | 92b427a54c5782fea71af3709ac564ba4dc67e57 (patch) | |
tree | d57896e8be36a52ee52c8b29e0ce51f84e19f02d /rhimport/importer.go | |
parent | 70a371f16e7a92821161e771a40b63c84fd194ea (diff) |
changed signature of progress callback
Diffstat (limited to 'rhimport/importer.go')
-rw-r--r-- | rhimport/importer.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/rhimport/importer.go b/rhimport/importer.go index 73d446e..5ffeef5 100644 --- a/rhimport/importer.go +++ b/rhimport/importer.go @@ -312,7 +312,7 @@ func importAudio(ctx *Context, res *Result) (err error) { } if ctx.ProgressCallBack != nil { - if keep := ctx.ProgressCallBack(2, "importing", ulnow/ultotal, ctx.ProgressCallBackData); !keep { + if keep := ctx.ProgressCallBack(2, "importing", ulnow, ultotal, ctx.ProgressCallBackData); !keep { ctx.ProgressCallBack = nil } } @@ -451,12 +451,6 @@ func ImportFile(ctx *Context) (res *Result, err error) { rhl.Printf("importer: ImportFile called with: show-id: %d, pool-name: '%s', cart/cut: %d/%d", ctx.ShowId, ctx.GroupName, ctx.Cart, ctx.Cut) - if ctx.ProgressCallBack != nil { - if keep := ctx.ProgressCallBack(2, "importing", 0.0, ctx.ProgressCallBackData); !keep { - ctx.ProgressCallBack = nil - } - } - // TODO: on trusted interfaces we should call getPassword again with cached=false after 401's if ctx.Trusted { if err = ctx.getPassword(true); err != nil { |