]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve dep update
authorqydysky <qydysky@foxmail.com>
Tue, 6 Aug 2024 17:50:49 +0000 (01:50 +0800)
committerqydysky <qydysky@foxmail.com>
Tue, 6 Aug 2024 17:50:49 +0000 (01:50 +0800)
F/api.go
Reply/tts.go
go.mod
go.sum

index d78c5558a512ef4f0ff9a437a760468d084c20c3..e6ac3ee3e038af669953a50e7b2ead8b89115060 100644 (file)
--- a/F/api.go
+++ b/F/api.go
@@ -20,7 +20,6 @@ import (
        "golang.org/x/exp/slices"
 
        _ "github.com/qydysky/biliApi"
-       p "github.com/qydysky/part"
        cmp "github.com/qydysky/part/component2"
        file "github.com/qydysky/part/file"
        funcCtrl "github.com/qydysky/part/funcCtrl"
@@ -921,7 +920,7 @@ func (t *GetFunc) Get_cookie() (missKey []string) {
                }
        }()
 
-       if p.Checkfile().IsExist("cookie.txt") { //读取cookie文件
+       if file.New("cookie.txt", 0, true).IsExist() { //读取cookie文件
                if cookieString := string(CookieGet()); cookieString != `` {
                        for k, v := range reqf.Cookies_String_2_Map(cookieString) { //cookie存入全局变量syncmap
                                t.Cookie.Store(k, v)
@@ -968,7 +967,7 @@ func (t *GetFunc) Get_cookie() (missKey []string) {
        }
 
        { //生成二维码
-               if e := qr.WriteFile(img_url, qr.Medium, 256, `qr.png`); e != nil || !p.Checkfile().IsExist(`qr.png`) {
+               if e := qr.WriteFile(img_url, qr.Medium, 256, `qr.png`); e != nil || !file.New("qr.png", 0, true).IsExist() {
                        apilog.L(`E: `, `qr error`)
                        return
                }
index 813045a80e60e4b687283cea7b79c24fe1ba86ae..41baff69d673dd6f6d5ce4b6f1c2209ddd3d5c03 100644 (file)
@@ -19,6 +19,7 @@ import (
        p "github.com/qydysky/part"
        file "github.com/qydysky/part/file"
        funcCtrl "github.com/qydysky/part/funcCtrl"
+       phash "github.com/qydysky/part/hash"
        limit "github.com/qydysky/part/limit"
        msgq "github.com/qydysky/part/msgq"
        reqf "github.com/qydysky/part/reqf"
@@ -236,7 +237,7 @@ func youdao(msg string) error {
                }
                postS string
        )
-       api[`sign`] = strings.ToUpper(p.Md5().Md5String(api[`youdaoappKey`] + api[`q`] + api[`salt`] + youdaoappKey))
+       api[`sign`] = strings.ToUpper(phash.Md5String(api[`youdaoappKey`] + api[`q`] + api[`salt`] + youdaoappKey))
        for k, v := range api {
                if postS != "" {
                        postS += "&"
diff --git a/go.mod b/go.mod
index 5cc395ae6a40fd8753dbbcaf43386966eb789117..0ddf721b347840fbcc7c2dee5683e05a9a1eb8df 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.2
 require (
        github.com/gotk3/gotk3 v0.6.4
        github.com/mdp/qrterminal/v3 v3.2.0
-       github.com/qydysky/part v0.28.20240721124143
+       github.com/qydysky/part v0.28.20240806174534
        github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
        github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
        golang.org/x/text v0.16.0
@@ -48,7 +48,6 @@ require (
        github.com/lib/pq v1.10.9
        github.com/miekg/dns v1.1.61 // indirect
        github.com/shirou/gopsutil v3.21.11+incompatible // indirect
-       github.com/thedevsaddam/gojsonq/v2 v2.5.2 // indirect
        github.com/tklauser/go-sysconf v0.3.14 // indirect
        github.com/tklauser/numcpus v0.8.0 // indirect
        github.com/yusufpapurcu/wmi v1.2.4 // indirect
diff --git a/go.sum b/go.sum
index e97392a9de4f667bf478b604df1b7f7beb657987..bd88dd4d452ab89b3cfbea517fc4e639cec9685d 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -46,8 +46,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/qydysky/biliApi v0.0.0-20240725184407-15076dddb6fb h1:dtSpNF9hLQa09TUfR+xbYFkHcx2breAFsXeU7e599gE=
 github.com/qydysky/biliApi v0.0.0-20240725184407-15076dddb6fb/go.mod h1:om024vfxALQ5vxsbaGoMm8IS0esLYBnEOpJI8FsGoDg=
-github.com/qydysky/part v0.28.20240721124143 h1:PX5BIhrrrnKN/VJFJSeg+qzdAPKb+N199vDtPjyNK5g=
-github.com/qydysky/part v0.28.20240721124143/go.mod h1:dgagZnPYRFZDbt7XJf7nADOJLoYwlebD9B8Z8g5aHhI=
+github.com/qydysky/part v0.28.20240806174534 h1:ouOgaLM0M2ByM9kDuZ8Tys/kIYAcPFdHy6iW332mI9U=
+github.com/qydysky/part v0.28.20240806174534/go.mod h1:dgagZnPYRFZDbt7XJf7nADOJLoYwlebD9B8Z8g5aHhI=
 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
 github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
@@ -61,8 +61,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
 github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/thedevsaddam/gojsonq/v2 v2.5.2 h1:CoMVaYyKFsVj6TjU6APqAhAvC07hTI6IQen8PHzHYY0=
-github.com/thedevsaddam/gojsonq/v2 v2.5.2/go.mod h1:bv6Xa7kWy82uT0LnXPE2SzGqTj33TAEeR560MdJkiXs=
 github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU=
 github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
 github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY=