⬆️ update deps

This commit is contained in:
源文雨
2022-03-11 11:36:55 +08:00
parent edd9feb8f8
commit 77e5d8b0c2
5 changed files with 7 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ func init() {
url = strings.ReplaceAll(url, "i.pixiv.cat", "i.pixiv.re")
name := url[strings.LastIndex(url, "/")+1 : len(url)-4]
m, err := pool.GetImage(name)
if err != nil && err != pool.ErrImgFileAsync {
if err != nil {
m.SetFile(url)
_, err = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
process.SleepAbout1sTo2s()

View File

@@ -54,7 +54,7 @@ func init() { // 插件主体
}
logrus.Debugln("[sausenao]开始下载", n)
err1 := illust.DownloadToCache(i)
if err != pool.ErrImgFileAsync && err1 == nil {
if err1 == nil {
m.SetFile(f)
_, _ = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
}

View File

@@ -163,10 +163,8 @@ func (p *imgpool) push(ctx *zero.Ctx, imgtype string, illust *pixiv.Illust) {
return
}
}
if err != imagepool.ErrImgFileAsync {
m.SetFile(f)
_, _ = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
}
m.SetFile(f)
_, _ = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
msg = message.Image("file:///" + f)
} else {
msg = message.Image(m.String())