From 77e5d8b0c2a57e33948ec3ae637a9e14580b026e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 11 Mar 2022 11:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20update=20deps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 +- go.sum | 3 ++- plugin/lolicon/lolicon.go | 2 +- plugin/saucenao/searcher.go | 2 +- plugin/setutime/setu_geter.go | 6 ++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 652831ac..bf9f23c0 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/FloatTech/AnimeAPI v1.3.1-0.20220311024222-ed58ddf6834e github.com/FloatTech/sqlite v0.2.1 - github.com/FloatTech/zbputils v1.3.1-0.20220307143543-1139754cacdf + github.com/FloatTech/zbputils v1.3.1-0.20220311032316-df8ab8b3c180 github.com/antchfx/htmlquery v1.2.4 github.com/corona10/goimagehash v1.0.3 github.com/fogleman/gg v1.3.0 diff --git a/go.sum b/go.sum index 10748a5d..2d47dbe0 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,9 @@ github.com/FloatTech/AnimeAPI v1.3.1-0.20220311024222-ed58ddf6834e/go.mod h1:JNF github.com/FloatTech/bot-manager v1.0.0/go.mod h1:8YYRJ16oroGHQGD2En0oVnmcKJkxR9O/jd5BPSfWfOQ= github.com/FloatTech/sqlite v0.2.1 h1:9t6Me48XJJCIoPy4nLRvcdhcVKfT0c2lilp7SEKROG8= github.com/FloatTech/sqlite v0.2.1/go.mod h1:6NfHRzqOo9RWeMJEoAQVuo51Omd5LFNxCNQhMF02/9U= -github.com/FloatTech/zbputils v1.3.1-0.20220307143543-1139754cacdf h1:891FSWb/olANthyZpmsqLWc8Xqr9yKxNOlRjZeHF/c8= github.com/FloatTech/zbputils v1.3.1-0.20220307143543-1139754cacdf/go.mod h1:u+PiX1khNvtAgfRVTVP4hkA2oUnn5q5dTZSk1Cgp0Gw= +github.com/FloatTech/zbputils v1.3.1-0.20220311032316-df8ab8b3c180 h1:8tE9DYu0+YMk3oKeO0ffl80818ZrPM9afbRgb2ag0tQ= +github.com/FloatTech/zbputils v1.3.1-0.20220311032316-df8ab8b3c180/go.mod h1:u+PiX1khNvtAgfRVTVP4hkA2oUnn5q5dTZSk1Cgp0Gw= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/RomiChan/websocket v1.4.3-0.20220123145318-307a86b127bc h1:AAx50/fb/xS4lvsdQg+bFbGvqSDhyV1MF+p2PLCamZ0= github.com/RomiChan/websocket v1.4.3-0.20220123145318-307a86b127bc/go.mod h1:OMmITAib6POA37xCichWM0aRnoVpSMZO1rB/G01wrr0= diff --git a/plugin/lolicon/lolicon.go b/plugin/lolicon/lolicon.go index 044a3863..d16e0ca0 100644 --- a/plugin/lolicon/lolicon.go +++ b/plugin/lolicon/lolicon.go @@ -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() diff --git a/plugin/saucenao/searcher.go b/plugin/saucenao/searcher.go index 1aa5cc9b..7af340da 100644 --- a/plugin/saucenao/searcher.go +++ b/plugin/saucenao/searcher.go @@ -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)) } diff --git a/plugin/setutime/setu_geter.go b/plugin/setutime/setu_geter.go index aa60eeb1..a2488df6 100644 --- a/plugin/setutime/setu_geter.go +++ b/plugin/setutime/setu_geter.go @@ -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())