diff --git a/src/env/env.go b/src/env/env.go index 10a24fc..4b13283 100644 --- a/src/env/env.go +++ b/src/env/env.go @@ -12,7 +12,7 @@ import ( ) const ( - Version = `1.0.2-b10` + Version = `1.0.2-b11` ) var ( @@ -64,8 +64,9 @@ type ( // 代理 Proxy_Enable bool `comment:"使用代理"` Proxy_Address string `comment:"代理地址 (支持http, socks)"` - // 平台账号 - // ...(待实现) + // 验证 + MusicIdVerify bool `comment:"(beta) 验证音乐ID可用性"` + ForceFallback bool `comment:"忽略音质限制,强制获取试听音频"` } // `comment:""` Conf_Custom struct { // wy (暂未实现) diff --git a/src/sources/builtin/driver.go b/src/sources/builtin/driver.go index d002db9..2b4d088 100644 --- a/src/sources/builtin/driver.go +++ b/src/sources/builtin/driver.go @@ -30,13 +30,16 @@ var ( // kw_pool = &sync.Pool{New: func() any { return new(KwApi_Song) }} kg_pool = &sync.Pool{New: func() any { return new(KgApi_Song) }} // tx_pool = &sync.Pool{New: func() any { return new(res_tx) }} + wv_pool *sync.Pool ) -const ( - errHttpReq = `无法连接解析接口` - errNoLink = `无法获取试听链接` - errDisable = `该音乐源已被禁用` -) +func init() { + env.Inits.Add(func() { + if env.Config.Source.MusicIdVerify { + wv_pool = &sync.Pool{New: func() any { return new(WyApi_Vef) }} + } + }) +} // 查询 func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { @@ -48,30 +51,50 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { // var outlink string jx := env.Loger.NewGroup(`Sources`) //sources.Loger.AppGroup(`builtin`) //env.Loger.NewGroup(`JieXiApis`) switch c.Source { - case s_wy: + case sources.S_wy: if !env.Config.Custom.Wy_Enable { - msg = errDisable + msg = sources.ErrDisable return } + // 可用性验证 + if env.Config.Source.MusicIdVerify { + vef := wv_pool.Get().(*WyApi_Vef) + defer wv_pool.Put(vef) + vurl := ztool.Str_FastConcat(`https://`, vef_wy, `&id=`, c.MusicID) + _, err := ztool.Net_HttpReq(http.MethodGet, vurl, nil, header_wy, &vef) + if err != nil { + jx.Error(`Wy, VefReq: %s`, err) + msg = sources.ErrHttpReq + return + } + jx.Debug(`Wy, Vef: %+v`, vef) + if vef.Code != 200 || !vef.Success { + msg = ztool.Str_FastConcat(`暂不可用:`, vef.Message) + return + } + } + // 获取外链 resp := wy_pool.Get().(*WyApi_Song) defer wy_pool.Put(resp) - + // 分流逻辑 (暂无其它节点) // urls := [...]string{ // ztool.Str_FastConcat(`http://`, api_wy, `?id=`, c.MusicID, `&level=`, rquery, `&noCookie=true`), // ztool.Str_FastConcat(`https://`, api_wy, `&id=`, c.MusicID, `&level=`, rquery, `&encodeType=`, c.Extname), // } // url := urls[rand.Intn(len(urls))] - url := ztool.Str_FastConcat(`https://`, api_wy, `&id=`, c.MusicID, `&level=`, rquery, `&encodeType=`, c.Extname) + url := ztool.Str_FastConcat( + `https://`, api_wy, `&id=`, c.MusicID, `&level=`, rquery, + `×tamp=`, strconv.FormatInt(time.Now().UnixMilli(), 10), + ) // jx.Debug(`Wy, Url: %v`, url) // wy源增加后端重试 默认3次 for i := 0; true; i++ { - // _, err := ztool.Net_HttpReq(http.MethodGet, url, nil, header_wy, &resp) - _, err := ztool.Net_HttpReq(http.MethodGet, url, nil, nil, &resp) + _, err := ztool.Net_HttpReq(http.MethodGet, url, nil, header_wy, &resp) if err != nil { jx.Error(`HttpReq, Err: %s, ReTry: %v`, err, i) if i > 3 { jx.Error(`Wy, HttpReq: %s`, err) - msg = errHttpReq //err.Error() + msg = sources.ErrHttpReq return } time.Sleep(time.Second) @@ -96,7 +119,7 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { } // jx.Info(`WyLink, RealQuality: %v`, data.Level) outlink = data.URL - case s_mg: + case sources.S_mg: resp := mg_pool.Get().(*MgApi_Song) defer mg_pool.Put(resp) @@ -105,7 +128,7 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { _, err := ztool.Net_HttpReq(http.MethodGet, url, nil, header_mg, &resp) if err != nil { jx.Error(`Mg, HttpReq: %s`, err) - msg = errHttpReq //err.Error() + msg = sources.ErrHttpReq return } jx.Debug(`Mg, Resp: %+v`, resp) @@ -114,9 +137,9 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { } // else { // jx.Debug(`Mg, Err: %#v`, resp) // } - case s_kw: + case sources.S_kw: if !env.Config.Custom.Kw_Enable { - msg = errDisable + msg = sources.ErrDisable return } ourl, emsg := kw.Url(c.MusicID, c.Quality) @@ -125,7 +148,7 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { return } outlink = ourl - case s_kg: + case sources.S_kg: resp := kg_pool.Get().(*KgApi_Song) defer kg_pool.Put(resp) @@ -142,10 +165,10 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { _, err := ztool.Net_HttpReq(http.MethodGet, url, nil, nil, &resp) if err != nil { jx.Error(`Kg, HttpReq: %s`, err) - msg = errHttpReq //err.Error() + msg = sources.ErrHttpReq return } - jx.Debug(`Kw, Resp: %+v`, resp) + jx.Debug(`Kg, Resp: %+v`, resp) if resp.ErrCode != 0 { msg = ztool.Str_FastConcat(`Error: `, strconv.Itoa(resp.ErrCode)) return @@ -158,15 +181,19 @@ func (s *Source) GetLink(c *caches.Query) (outlink string, msg string) { } if data.PlayBackupURL == `` { if data.PlayURL == `` { - msg = errNoLink + msg = sources.ErrNoLink return } outlink = data.PlayURL } outlink = data.PlayBackupURL - case s_tx: - sep := c.Split() - ourl, emsg := tx.Url(sep[0], c.Quality) + case sources.S_tx: + // sep := c.Split() + if len(c.MusicID) != 14 { + msg = sources.E_VefMusicId + return + } + ourl, emsg := tx.Url(c.MusicID, c.Quality) if emsg != `` { msg = emsg return diff --git a/src/sources/builtin/types.go b/src/sources/builtin/types.go index 2fd4605..a9a84f2 100644 --- a/src/sources/builtin/types.go +++ b/src/sources/builtin/types.go @@ -1,11 +1,14 @@ package builtin -import "github.com/ZxwyWebSite/ztool" +import ( + "lx-source/src/sources" + + "github.com/ZxwyWebSite/ztool" +) type ( // 网易音乐接口 (方格/简繁) WyApi_Song struct { - // Code int `json:"code"` Data []struct { ID int `json:"id"` URL string `json:"url"` @@ -44,6 +47,12 @@ type ( EffectTypes interface{} `json:"effectTypes"` Time int `json:"time"` } `json:"data"` + Code int `json:"code"` + } + WyApi_Vef struct { + Code int16 `json:"code"` + Success bool `json:"success"` + Message string `json:"message"` } // 咪咕音乐接口 MgApi_Song struct { @@ -204,15 +213,15 @@ type ( // } ) -const ( - // Source - s_wy = `wy` - s_mg = `mg` - s_kw = `kw` - s_kg = `kg` - s_tx = `tx` - // s_lx = `lx` -) +// const ( +// // Source +// s_wy = `wy` +// s_mg = `mg` +// s_kw = `kw` +// s_kg = `kg` +// s_tx = `tx` +// // s_lx = `lx` +// ) var ( // 音质列表 ( [通用音质][音乐平台]对应音质 ) @@ -220,30 +229,30 @@ var ( 注: kg源使用对应hash匹配音质,故为空 */ qualitys = map[string]map[string]string{ - `128k`: { - s_wy: `standard`, - s_mg: `1`, - s_kw: `128k`, - s_kg: ``, - s_tx: `M500`, + sources.Q_128k: { + sources.S_wy: `standard`, + sources.S_mg: `1`, + sources.S_kw: sources.Q_128k, + sources.S_kg: ``, + sources.S_tx: `M500`, }, - `320k`: { - s_wy: `exhigh`, - s_mg: `2`, - s_kw: `320k`, - // s_kg: ``, - s_tx: `M800`, + sources.Q_320k: { + sources.S_wy: `exhigh`, + sources.S_mg: `2`, + sources.S_kw: sources.Q_320k, + // sources.S_kg: ``, + sources.S_tx: `M800`, }, - `flac`: { - s_wy: `lossless`, - s_mg: `3`, - s_kw: `2000k`, - s_tx: `F000`, + sources.Q_flac: { + sources.S_wy: `lossless`, + sources.S_mg: `3`, + sources.S_kw: `2000k`, + sources.S_tx: `F000`, }, - `flac24bit`: { - s_wy: `hires`, - s_mg: `4`, - // s_tx: `RS01`, + sources.Q_fl24: { + sources.S_wy: `hires`, + sources.S_mg: `4`, + // sources.S_tx: `RS01`, }, // `fl24`: { // s_wy: `hires`, @@ -253,34 +262,32 @@ var ( // ApiAddr api_wy string api_mg string - api_kw string + // api_kw string api_kg string = `https://wwwapi.kugou.com/yy/index.php?r=play/getdata&platid=4&mid=1` // api_tx string = `https://u.y.qq.com/cgi-bin/musicu.fcg?data=` + vef_wy string // Headers header_wy map[string]string header_mg map[string]string - header_kw map[string]string + // header_kw map[string]string // header_tx = map[string]string{`Referer`: `https://y.qq.com/`} ) func init() { // InitBuiltInSource var initdata = struct { - Api_Wy_Fy *string - Api_Wy_Qz *string + Api_Wy *string Api_Mg *string - Api_Kw *string + Vef_Wy *string Header_Wy *map[string]string Header_Mg *map[string]string - Header_Kw *map[string]string }{ - Api_Wy_Qz: &api_wy, + Api_Wy: &api_wy, Api_Mg: &api_mg, - Api_Kw: &api_kw, + Vef_Wy: &vef_wy, Header_Wy: &header_wy, Header_Mg: &header_mg, - Header_Kw: &header_kw, } - data := []byte{0x6a, 0x7f, 0x3, 0x1, 0x2, 0xff, 0x80, 0x0, 0x1, 0x7, 0x1, 0x9, 0x41, 0x70, 0x69, 0x5f, 0x57, 0x79, 0x5f, 0x46, 0x79, 0x1, 0xc, 0x0, 0x1, 0x9, 0x41, 0x70, 0x69, 0x5f, 0x57, 0x79, 0x5f, 0x51, 0x7a, 0x1, 0xc, 0x0, 0x1, 0x6, 0x41, 0x70, 0x69, 0x5f, 0x4d, 0x67, 0x1, 0xc, 0x0, 0x1, 0x6, 0x41, 0x70, 0x69, 0x5f, 0x4b, 0x77, 0x1, 0xc, 0x0, 0x1, 0x9, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x57, 0x79, 0x1, 0xff, 0x82, 0x0, 0x1, 0x9, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x4d, 0x67, 0x1, 0xff, 0x82, 0x0, 0x1, 0x9, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x4b, 0x77, 0x1, 0xff, 0x82, 0x0, 0x0, 0x0, 0x21, 0xff, 0x81, 0x4, 0x1, 0x1, 0x11, 0x6d, 0x61, 0x70, 0x5b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1, 0xff, 0x82, 0x0, 0x1, 0xc, 0x1, 0xc, 0x0, 0x0, 0xfe, 0x4, 0x30, 0xff, 0x80, 0x1, 0x19, 0x6e, 0x6d, 0x2e, 0x66, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x6f, 0x6e, 0x67, 0x2f, 0x75, 0x72, 0x6c, 0x2f, 0x76, 0x31, 0x1, 0x24, 0x63, 0x73, 0x6d, 0x2e, 0x73, 0x61, 0x79, 0x71, 0x7a, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x3f, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x61, 0x70, 0x69, 0x53, 0x6f, 0x6e, 0x67, 0x55, 0x72, 0x6c, 0x56, 0x31, 0x1, 0x36, 0x6d, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2e, 0x6d, 0x69, 0x67, 0x75, 0x2e, 0x63, 0x6e, 0x2f, 0x6d, 0x69, 0x67, 0x75, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2f, 0x68, 0x35, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x53, 0x6f, 0x6e, 0x67, 0x50, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x1, 0x2d, 0x62, 0x64, 0x2d, 0x61, 0x70, 0x69, 0x2e, 0x6b, 0x75, 0x77, 0x6f, 0x2e, 0x63, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x1, 0x1, 0x6, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0xfe, 0x2, 0xaa, 0x4d, 0x55, 0x53, 0x49, 0x43, 0x5f, 0x55, 0x3d, 0x30, 0x30, 0x42, 0x34, 0x43, 0x31, 0x45, 0x33, 0x46, 0x44, 0x37, 0x37, 0x34, 0x31, 0x30, 0x37, 0x38, 0x30, 0x45, 0x46, 0x31, 0x43, 0x30, 0x38, 0x34, 0x30, 0x44, 0x30, 0x38, 0x46, 0x33, 0x46, 0x35, 0x45, 0x37, 0x30, 0x33, 0x30, 0x45, 0x32, 0x44, 0x30, 0x35, 0x32, 0x43, 0x41, 0x38, 0x45, 0x43, 0x39, 0x38, 0x41, 0x37, 0x33, 0x36, 0x38, 0x46, 0x37, 0x41, 0x37, 0x46, 0x36, 0x36, 0x34, 0x39, 0x42, 0x32, 0x31, 0x36, 0x45, 0x39, 0x35, 0x33, 0x33, 0x41, 0x31, 0x41, 0x31, 0x37, 0x34, 0x44, 0x37, 0x32, 0x43, 0x43, 0x41, 0x44, 0x46, 0x39, 0x39, 0x35, 0x35, 0x34, 0x32, 0x32, 0x38, 0x45, 0x38, 0x35, 0x32, 0x44, 0x45, 0x34, 0x36, 0x42, 0x42, 0x44, 0x32, 0x45, 0x41, 0x32, 0x41, 0x36, 0x42, 0x32, 0x41, 0x31, 0x34, 0x33, 0x33, 0x41, 0x33, 0x44, 0x46, 0x34, 0x38, 0x42, 0x36, 0x32, 0x45, 0x41, 0x41, 0x37, 0x36, 0x46, 0x43, 0x31, 0x38, 0x43, 0x44, 0x35, 0x39, 0x32, 0x35, 0x36, 0x46, 0x45, 0x46, 0x36, 0x45, 0x37, 0x36, 0x44, 0x33, 0x39, 0x46, 0x42, 0x34, 0x32, 0x44, 0x46, 0x37, 0x36, 0x43, 0x45, 0x35, 0x30, 0x36, 0x38, 0x43, 0x36, 0x39, 0x45, 0x33, 0x39, 0x34, 0x34, 0x45, 0x33, 0x41, 0x36, 0x45, 0x38, 0x45, 0x33, 0x43, 0x32, 0x36, 0x31, 0x33, 0x35, 0x44, 0x42, 0x45, 0x30, 0x44, 0x39, 0x37, 0x39, 0x31, 0x46, 0x43, 0x45, 0x30, 0x42, 0x44, 0x35, 0x32, 0x34, 0x42, 0x44, 0x32, 0x37, 0x46, 0x36, 0x32, 0x32, 0x36, 0x46, 0x44, 0x36, 0x34, 0x36, 0x30, 0x42, 0x30, 0x35, 0x36, 0x34, 0x36, 0x41, 0x35, 0x34, 0x39, 0x41, 0x35, 0x43, 0x34, 0x32, 0x39, 0x46, 0x35, 0x45, 0x30, 0x31, 0x45, 0x42, 0x41, 0x34, 0x45, 0x32, 0x44, 0x38, 0x44, 0x36, 0x31, 0x35, 0x42, 0x44, 0x37, 0x31, 0x35, 0x41, 0x37, 0x44, 0x32, 0x34, 0x35, 0x42, 0x31, 0x33, 0x44, 0x39, 0x45, 0x35, 0x37, 0x30, 0x45, 0x38, 0x37, 0x44, 0x30, 0x41, 0x44, 0x41, 0x36, 0x30, 0x38, 0x41, 0x36, 0x30, 0x37, 0x46, 0x32, 0x46, 0x41, 0x45, 0x46, 0x32, 0x32, 0x41, 0x46, 0x38, 0x45, 0x45, 0x39, 0x34, 0x46, 0x38, 0x32, 0x37, 0x41, 0x46, 0x31, 0x35, 0x30, 0x45, 0x39, 0x45, 0x31, 0x43, 0x35, 0x31, 0x37, 0x43, 0x42, 0x30, 0x46, 0x31, 0x35, 0x38, 0x38, 0x45, 0x46, 0x38, 0x46, 0x31, 0x44, 0x36, 0x31, 0x39, 0x34, 0x37, 0x43, 0x34, 0x33, 0x37, 0x38, 0x34, 0x39, 0x38, 0x35, 0x43, 0x46, 0x37, 0x34, 0x46, 0x36, 0x39, 0x34, 0x35, 0x38, 0x37, 0x34, 0x38, 0x39, 0x36, 0x30, 0x43, 0x45, 0x39, 0x32, 0x30, 0x35, 0x33, 0x43, 0x41, 0x37, 0x32, 0x42, 0x35, 0x46, 0x45, 0x46, 0x39, 0x32, 0x43, 0x39, 0x33, 0x46, 0x31, 0x32, 0x46, 0x33, 0x36, 0x37, 0x31, 0x34, 0x46, 0x30, 0x42, 0x33, 0x34, 0x36, 0x43, 0x32, 0x45, 0x41, 0x46, 0x38, 0x39, 0x46, 0x41, 0x41, 0x35, 0x31, 0x36, 0x41, 0x38, 0x39, 0x37, 0x34, 0x45, 0x38, 0x43, 0x46, 0x35, 0x33, 0x44, 0x35, 0x34, 0x39, 0x32, 0x44, 0x45, 0x39, 0x35, 0x45, 0x44, 0x38, 0x35, 0x39, 0x31, 0x43, 0x43, 0x43, 0x46, 0x34, 0x35, 0x41, 0x45, 0x42, 0x36, 0x32, 0x37, 0x43, 0x39, 0x33, 0x42, 0x30, 0x43, 0x44, 0x33, 0x37, 0x30, 0x41, 0x45, 0x46, 0x42, 0x36, 0x35, 0x36, 0x45, 0x41, 0x44, 0x41, 0x44, 0x30, 0x33, 0x31, 0x46, 0x36, 0x38, 0x38, 0x41, 0x36, 0x42, 0x42, 0x32, 0x43, 0x45, 0x33, 0x43, 0x39, 0x46, 0x41, 0x33, 0x31, 0x42, 0x44, 0x36, 0x31, 0x36, 0x36, 0x41, 0x31, 0x36, 0x41, 0x42, 0x45, 0x42, 0x45, 0x44, 0x41, 0x44, 0x46, 0x43, 0x46, 0x45, 0x46, 0x42, 0x44, 0x43, 0x45, 0x44, 0x35, 0x44, 0x34, 0x45, 0x31, 0x32, 0x46, 0x46, 0x46, 0x31, 0x34, 0x30, 0x33, 0x43, 0x34, 0x46, 0x32, 0x42, 0x35, 0x41, 0x33, 0x46, 0x32, 0x34, 0x32, 0x32, 0x45, 0x46, 0x39, 0x44, 0x30, 0x38, 0x37, 0x38, 0x43, 0x30, 0x42, 0x35, 0x32, 0x44, 0x30, 0x38, 0x39, 0x36, 0x37, 0x44, 0x35, 0x38, 0x45, 0x32, 0x45, 0x39, 0x44, 0x41, 0x43, 0x45, 0x37, 0x35, 0x34, 0x34, 0x30, 0x34, 0x45, 0x32, 0x44, 0x36, 0x45, 0x31, 0x46, 0x38, 0x31, 0x46, 0x35, 0x32, 0x41, 0x31, 0x46, 0x31, 0x37, 0x33, 0x35, 0x43, 0x41, 0x39, 0x46, 0x42, 0x42, 0x38, 0x35, 0x44, 0x37, 0x35, 0x38, 0x46, 0x38, 0x31, 0x45, 0x30, 0x41, 0x37, 0x43, 0x42, 0x41, 0x34, 0x31, 0x43, 0x35, 0x37, 0x33, 0x39, 0x44, 0x32, 0x39, 0x45, 0x32, 0x38, 0x34, 0x46, 0x36, 0x38, 0x34, 0x33, 0x30, 0x45, 0x42, 0x31, 0x33, 0x45, 0x34, 0x46, 0x34, 0x39, 0x33, 0x38, 0x39, 0x30, 0x38, 0x34, 0x30, 0x30, 0x33, 0x31, 0x44, 0x33, 0x42, 0x44, 0x32, 0x37, 0x45, 0x1, 0x4, 0x7, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6d, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2e, 0x6d, 0x69, 0x67, 0x75, 0x2e, 0x63, 0x6e, 0x2f, 0x76, 0x34, 0x2f, 0x2, 0x42, 0x79, 0x20, 0x30, 0x34, 0x66, 0x38, 0x31, 0x34, 0x36, 0x31, 0x61, 0x39, 0x38, 0x63, 0x37, 0x61, 0x66, 0x35, 0x35, 0x37, 0x66, 0x65, 0x61, 0x33, 0x63, 0x66, 0x32, 0x38, 0x63, 0x34, 0x65, 0x61, 0x31, 0x35, 0x7, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7, 0x30, 0x31, 0x34, 0x30, 0x30, 0x30, 0x44, 0x6, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x38, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x3d, 0x5a, 0x54, 0x49, 0x77, 0x4f, 0x44, 0x6b, 0x79, 0x4d, 0x44, 0x51, 0x74, 0x4f, 0x54, 0x45, 0x31, 0x4e, 0x53, 0x30, 0x30, 0x4d, 0x44, 0x68, 0x6c, 0x4c, 0x54, 0x68, 0x68, 0x4d, 0x57, 0x45, 0x74, 0x4d, 0x6a, 0x51, 0x30, 0x4e, 0x32, 0x59, 0x32, 0x4d, 0x7a, 0x6b, 0x32, 0x4f, 0x54, 0x41, 0x7a, 0x1, 0x6, 0x7, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2, 0x71, 0x71, 0x4, 0x70, 0x6c, 0x61, 0x74, 0x2, 0x61, 0x72, 0x3, 0x6e, 0x65, 0x74, 0x4, 0x77, 0x69, 0x66, 0x69, 0x3, 0x76, 0x65, 0x72, 0x5, 0x33, 0x2e, 0x31, 0x2e, 0x32, 0x3, 0x75, 0x69, 0x64, 0x0, 0x5, 0x64, 0x65, 0x76, 0x49, 0x64, 0x1, 0x30, 0x0} + data := []byte{0x4a, 0x7f, 0x3, 0x1, 0x2, 0xff, 0x80, 0x0, 0x1, 0x5, 0x1, 0x6, 0x41, 0x70, 0x69, 0x5f, 0x57, 0x79, 0x1, 0xc, 0x0, 0x1, 0x6, 0x41, 0x70, 0x69, 0x5f, 0x4d, 0x67, 0x1, 0xc, 0x0, 0x1, 0x6, 0x56, 0x65, 0x66, 0x5f, 0x57, 0x79, 0x1, 0xc, 0x0, 0x1, 0x9, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x57, 0x79, 0x1, 0xff, 0x82, 0x0, 0x1, 0x9, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x4d, 0x67, 0x1, 0xff, 0x82, 0x0, 0x0, 0x0, 0x21, 0xff, 0x81, 0x4, 0x1, 0x1, 0x11, 0x6d, 0x61, 0x70, 0x5b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1, 0xff, 0x82, 0x0, 0x1, 0xc, 0x1, 0xc, 0x0, 0x0, 0xfe, 0x1, 0xca, 0xff, 0x80, 0x1, 0x23, 0x70, 0x74, 0x2e, 0x73, 0x61, 0x79, 0x71, 0x7a, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x3f, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x61, 0x70, 0x69, 0x53, 0x6f, 0x6e, 0x67, 0x55, 0x72, 0x6c, 0x56, 0x31, 0x1, 0x36, 0x6d, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2e, 0x6d, 0x69, 0x67, 0x75, 0x2e, 0x63, 0x6e, 0x2f, 0x6d, 0x69, 0x67, 0x75, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2f, 0x68, 0x35, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x53, 0x6f, 0x6e, 0x67, 0x50, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x1, 0x24, 0x70, 0x74, 0x2e, 0x73, 0x61, 0x79, 0x71, 0x7a, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x3f, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x63, 0x73, 0x6d, 0x43, 0x68, 0x65, 0x61, 0x6b, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x1, 0x3, 0xa, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x5e, 0x4d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61, 0x2f, 0x35, 0x2e, 0x30, 0x20, 0x28, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x4e, 0x54, 0x20, 0x36, 0x2e, 0x31, 0x3b, 0x20, 0x57, 0x4f, 0x57, 0x36, 0x34, 0x29, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x69, 0x74, 0x2f, 0x35, 0x33, 0x37, 0x2e, 0x33, 0x36, 0x20, 0x28, 0x4b, 0x48, 0x54, 0x4d, 0x4c, 0x2c, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x29, 0x20, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x65, 0x2f, 0x35, 0x30, 0x2e, 0x30, 0x2e, 0x32, 0x36, 0x36, 0x31, 0x2e, 0x38, 0x37, 0x10, 0x58, 0x2d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2d, 0x57, 0x69, 0x74, 0x68, 0xe, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x7, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x15, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x70, 0x74, 0x2e, 0x73, 0x61, 0x79, 0x71, 0x7a, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x1, 0x4, 0x6, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x38, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x3d, 0x5a, 0x54, 0x49, 0x77, 0x4f, 0x44, 0x6b, 0x79, 0x4d, 0x44, 0x51, 0x74, 0x4f, 0x54, 0x45, 0x31, 0x4e, 0x53, 0x30, 0x30, 0x4d, 0x44, 0x68, 0x6c, 0x4c, 0x54, 0x68, 0x68, 0x4d, 0x57, 0x45, 0x74, 0x4d, 0x6a, 0x51, 0x30, 0x4e, 0x32, 0x59, 0x32, 0x4d, 0x7a, 0x6b, 0x32, 0x4f, 0x54, 0x41, 0x7a, 0x7, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6d, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2e, 0x6d, 0x69, 0x67, 0x75, 0x2e, 0x63, 0x6e, 0x2f, 0x76, 0x34, 0x2f, 0x2, 0x42, 0x79, 0x20, 0x30, 0x34, 0x66, 0x38, 0x31, 0x34, 0x36, 0x31, 0x61, 0x39, 0x38, 0x63, 0x37, 0x61, 0x66, 0x35, 0x35, 0x37, 0x66, 0x65, 0x61, 0x33, 0x63, 0x66, 0x32, 0x38, 0x63, 0x34, 0x65, 0x61, 0x31, 0x35, 0x7, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7, 0x30, 0x31, 0x34, 0x30, 0x30, 0x30, 0x44, 0x0} ztool.Val_GobDecode(data, &initdata) } diff --git a/src/sources/source.go b/src/sources/source.go index e5169d5..72276f3 100644 --- a/src/sources/source.go +++ b/src/sources/source.go @@ -24,6 +24,7 @@ const ( E_QNotSupport = `不支持的音质` E_QNotMatch = `实际音质不匹配` E_NoLink = `无法获取音乐链接` + E_VefMusicId = `音乐ID校验失败` // 内置错误 ErrHttpReq = `无法连接解析接口` ErrNoLink = `无法获取试听链接` diff --git a/update.md b/update.md index fc31efe..c94c4ec 100644 --- a/update.md +++ b/update.md @@ -1,5 +1,11 @@ ## Lx-Source/更新日志 +#### \# 2024-01-15 v1.0.2-b11 (beta) + ++ 测试版MusicId验证 ++ (注:任何前置验证都必然会延长响应时间,请确认会用到再开启) ++ 修复wy源内置接口 + #### \# 2024-01-13 v1.0.2-b10 (beta) + 不再支持自定义Public目录,默认使用内置embedFS提供服务 + 修改脚本更新路径为 `public/lx-custom-source.js`