@@ -41,7 +41,7 @@ class Request {
4141
4242    private  val  regex =  Regex (""" des_key = "([^"]+).+var des_iv = "([^"]+)""" 
4343    private  val  input = 
44-         """ {"mver":"1","subver":"1.2","host":"www.yangshipin.cn/#/tv/home?pid=","referer":"","canvas":"YSPANGLE(Apple,AppleM1Pro,OpenGL4.1 )"}""" 
44+         """ {"mver":"1","subver":"1.2","host":"www.yangshipin.cn/#/tv/home?pid=","referer":"","canvas":"YSPANGLE(Apple,ANGLEMetalRenderer: AppleM1Pro,UnspecifiedVersion )"}""" 
4545
4646    private  var  mapping =  mapOf (
4747        " CCTV4K" " CCTV4K 超高清" 
@@ -118,6 +118,7 @@ class Request {
118118            override  fun  onResponse (call :  Call <LiveInfo >, response :  Response <LiveInfo >) {
119119                if  (response.isSuccessful) {
120120                    val  liveInfo =  response.body()
121+ 
121122                    if  (liveInfo?.data?.playurl !=  null ) {
122123                        val  chanll =  liveInfo.data.chanll
123124                        val  decodedBytes =  Base64 .decode(
@@ -133,8 +134,8 @@ class Request {
133134                            val  url =  liveInfo.data.playurl +  " &revoi=" +  encryptTripleDES(
134135                                keyBytes +  byteArrayOf(0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ),
135136                                ivBytes
136-                             ).uppercase()
137- //                             Log.d(TAG, "$title url $url")
137+                             ).uppercase()  +  liveInfo.data.extended_param 
138+                             Log .d(TAG , " $title  url $url " 
138139                            tvModel.addVideoUrl(url)
139140                            tvModel.allReady()
140141                            tvModel.retryTimes =  0 
@@ -202,7 +203,7 @@ class Request {
202203            }
203204
204205            override  fun  onFailure (call :  Call <LiveInfo >, t :  Throwable ) {
205-                 Log .e(TAG , " $title  request error" 
206+                 Log .e(TAG , " $title  request error  $t " 
206207                if  (tvModel.retryTimes <  tvModel.retryMaxTimes) {
207208                    tvModel.retryTimes++ 
208209                    if  (tvModel.getTV().needToken) {
@@ -354,29 +355,21 @@ class Request {
354355            ) {
355356                if  (response.isSuccessful) {
356357                    val  body =  response.body()
357- 
358358                    if  (body?.data?.feedModuleListCount ==  1 ) {
359359                        for  (item in  body.data?.feedModuleListList!! [0 ]?.dataTvChannelListList!! ) {
360-                             if  (item.isVip &&  ! item.isLimitedFree) {
361-                                 continue 
362-                             }
363-                             Log .i(
360+                             Log .d(
364361                                TAG ,
365362                                " ${item.channelName} ,${item.pid} ,${item.streamId} " 
366363                            )
367-                             var  channelType =  " 央视频道" 
368-                             if  (item?.channelType == =  " weishi" 
369-                                 channelType =  " 地方频道" 
370-                             }
371-                             if  (! mapping.containsKey(item.channelName)) {
372-                                 continue 
373-                             }
374-                             val  tv = 
375-                                 TVList .list[channelType]?.find { it.title ==  mapping[item.channelName] }
376-                             if  (tv !=  null ) {
377-                                 tv.logo =  item.tvLogo
378-                                 tv.pid =  item.pid
379-                                 tv.sid =  item.streamId
364+ 
365+                             for  ((_, v) in  TVList .list) {
366+                                 for  (v2 in  v) {
367+                                     Log .i(TAG , " $v2 " 
368+                                     if  (v2.title ==  item.channelName ||  v2.alias ==  item.channelName) {
369+                                         v2.pid =  item.pid
370+                                         v2.sid =  item.streamId
371+                                     }
372+                                 }
380373                            }
381374                        }
382375                    }
0 commit comments