File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,16 +75,11 @@ func (hanler *FNTVHandler) ModifyStream(rw *http.Response) error {
7575 logging .Debugf ("FNTV ModifyStream 处理耗时: %s" , time .Since (startTime ).String ())
7676 }()
7777
78- data , err := io . ReadAll (rw .Body )
78+ jsonChain , err := utils . NewFromReader (rw .Body , jsonChainOption )
7979 if err != nil {
8080 logging .Warning ("读取响应体失败:" , err )
8181 return err
8282 }
83- defer rw .Body .Close ()
84- logging .Debug (string (data ))
85-
86- jsonChain := utils .NewFromBytesWithCopy (data , jsonChainOption )
87-
8883 code := jsonChain .Get ("code" ).Int ()
8984 if code != 0 {
9085 logging .Warningf ("stream 响应 code: %d, msg: %s" , code , jsonChain .Get ("msg" ).String ())
@@ -138,7 +133,7 @@ func (hanler *FNTVHandler) ModifyStream(rw *http.Response) error {
138133 logging .Debugf ("%s 未匹配任何 Strm 类型,保持原有播放链接不变" , filePath )
139134 }
140135
141- data , err = jsonChain .Result ()
136+ data , err : = jsonChain .Result ()
142137 if err != nil {
143138 logging .Warning ("操作 FNTV Stream Json 错误:" , err )
144139 return err
You can’t perform that action at this time.
0 commit comments