From 55f7683d7dcfec36f892862bed31457af59bd3c4 Mon Sep 17 00:00:00 2001 From: qydysky Date: Tue, 18 Jun 2024 17:01:25 +0000 Subject: [PATCH] =?utf8?q?Improve=20state=E9=A1=B5=E6=B5=81=E6=9C=8D?= =?utf8?q?=E5=8A=A1=E5=99=A8=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA=E6=97=B6?= =?utf8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- CV/Var.go | 3 +++ F/api.go | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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 { -- 2.39.2