From: qydysky Date: Tue, 18 Jun 2024 17:01:25 +0000 (+0000) Subject: Improve state页流服务器添加创建时间 X-Git-Tag: v0.14.6~4 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=55f7683d7dcfec36f892862bed31457af59bd3c4;p=bili_danmu%2F.git Improve state页流服务器添加创建时间 --- diff --git a/CV/Var.go b/CV/Var.go index 008bd37..722687b 100644 --- a/CV/Var.go +++ b/CV/Var.go @@ -89,6 +89,7 @@ type LiveQn struct { Url string `json:"-"` Codec string ReUpTime time.Time + CreateTime time.Time DisableCount int Expires time.Time //流到期时间 } @@ -98,6 +99,7 @@ func (t LiveQn) MarshalJSON() ([]byte, error) { Host string Up bool Codec string + CreateTime string ReUpTime string Expires string DisableCount int @@ -105,6 +107,7 @@ func (t LiveQn) MarshalJSON() ([]byte, error) { Host: t.Host(), Up: time.Now().After(t.ReUpTime), Codec: t.Codec, + CreateTime: t.CreateTime.Format(time.DateTime), ReUpTime: t.ReUpTime.Format(time.DateTime), Expires: t.Expires.Format(time.DateTime), DisableCount: t.DisableCount, diff --git a/F/api.go b/F/api.go index 07b6cae..25343cf 100644 --- a/F/api.go +++ b/F/api.go @@ -462,8 +462,9 @@ func (t *GetFunc) configStreamType(sts []struct { //直播流链接 for _, v1 := range v.URLInfo { item := c.LiveQn{ - Codec: v.CodecName, - Url: v1.Host + v.BaseURL + v1.Extra, + Codec: v.CodecName, + Url: v1.Host + v.BaseURL + v1.Extra, + CreateTime: time.Now(), } if query, e := url.ParseQuery(v1.Extra); e == nil {