style(offline_download): add more description in log (#653)

fix(offline_download): add more description in log
This commit is contained in:
MadDogOwner
2025-07-09 14:16:05 +08:00
committed by GitHub
parent 3838ef0663
commit 7c7cec0993
2 changed files with 4 additions and 4 deletions

View File

@ -9,9 +9,9 @@ func InitOfflineDownloadTools() {
for k, v := range tool.Tools {
res, err := v.Init()
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 {
utils.Log.Infof("init tool %s success: %s", k, res)
utils.Log.Infof("init offline download tool %s success: %s", k, res)
}
}
}

View File

@ -72,13 +72,13 @@ func AddURL(ctx context.Context, args *AddURLArgs) (task.TaskExtensionInfo, erro
// get tool
tool, err := Tools.Get(args.Tool)
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
if !tool.IsReady() {
// try to init tool
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)
}
}