mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
style(offline_download): add more description in log (#653)
fix(offline_download): add more description in log
This commit is contained in:
@ -9,9 +9,9 @@ func InitOfflineDownloadTools() {
|
|||||||
for k, v := range tool.Tools {
|
for k, v := range tool.Tools {
|
||||||
res, err := v.Init()
|
res, err := v.Init()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Log.Warnf("init tool %s failed: %s", k, err)
|
utils.Log.Warnf("init offline download tool %s failed: %s", k, err)
|
||||||
} else {
|
} else {
|
||||||
utils.Log.Infof("init tool %s success: %s", k, res)
|
utils.Log.Infof("init offline download tool %s success: %s", k, res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,13 +72,13 @@ func AddURL(ctx context.Context, args *AddURLArgs) (task.TaskExtensionInfo, erro
|
|||||||
// get tool
|
// get tool
|
||||||
tool, err := Tools.Get(args.Tool)
|
tool, err := Tools.Get(args.Tool)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "failed get tool")
|
return nil, errors.Wrapf(err, "failed get offline download tool")
|
||||||
}
|
}
|
||||||
// check tool is ready
|
// check tool is ready
|
||||||
if !tool.IsReady() {
|
if !tool.IsReady() {
|
||||||
// try to init tool
|
// try to init tool
|
||||||
if _, err := tool.Init(); err != nil {
|
if _, err := tool.Init(); err != nil {
|
||||||
return nil, errors.Wrapf(err, "failed init tool %s", args.Tool)
|
return nil, errors.Wrapf(err, "failed init offline download tool %s", args.Tool)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user