mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-31 08:36:29 +08:00
add epg
This commit is contained in:
@@ -57,7 +57,6 @@ class MainActivity : FragmentActivity(), Request.RequestListener {
|
||||
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
Request.onCreate()
|
||||
Request.setRequestListener(this)
|
||||
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
@@ -191,7 +190,7 @@ class MainActivity : FragmentActivity(), Request.RequestListener {
|
||||
fun fragmentReady() {
|
||||
ready++
|
||||
Log.i(TAG, "ready $ready")
|
||||
if (ready == 6) {
|
||||
if (ready == 5) {
|
||||
mainFragment.fragmentReady()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.lizongying.mytv.Utils.dpToPx
|
||||
import com.lizongying.mytv.api.YSP
|
||||
import com.lizongying.mytv.databinding.RowBinding
|
||||
import com.lizongying.mytv.databinding.ShowBinding
|
||||
import com.lizongying.mytv.models.ProgramType
|
||||
import com.lizongying.mytv.models.TVListViewModel
|
||||
import com.lizongying.mytv.models.TVViewModel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -65,8 +66,6 @@ class MainFragment : Fragment(), CardAdapter.ItemListener {
|
||||
tvViewModel.setItemPosition(idx2)
|
||||
tvListViewModelCurrent.addTVViewModel(tvViewModel)
|
||||
tvListViewModel.addTVViewModel(tvViewModel)
|
||||
|
||||
updateEPG(tvViewModel)
|
||||
}
|
||||
tvListViewModel.maxNum.add(v.size)
|
||||
|
||||
@@ -263,6 +262,10 @@ class MainFragment : Fragment(), CardAdapter.ItemListener {
|
||||
fun fragmentReady() {
|
||||
// request.fetchPage()
|
||||
tvListViewModel.getTVViewModel(itemPosition)?.changed()
|
||||
|
||||
tvListViewModel.tvListViewModel.value?.forEach { tvViewModel ->
|
||||
updateEPG(tvViewModel)
|
||||
}
|
||||
}
|
||||
|
||||
fun play(itemPosition: Int) {
|
||||
@@ -300,10 +303,18 @@ class MainFragment : Fragment(), CardAdapter.ItemListener {
|
||||
}
|
||||
|
||||
private fun updateEPG(tvViewModel: TVViewModel) {
|
||||
if (tvViewModel.getTV().channel == "港澳台") {
|
||||
Request.fetchFEPG(tvViewModel)
|
||||
} else {
|
||||
Request.fetchYEPG(tvViewModel)
|
||||
when (tvViewModel.getTV().programType) {
|
||||
ProgramType.Y_PROTO -> {
|
||||
Request.fetchYProtoEPG(tvViewModel)
|
||||
}
|
||||
|
||||
ProgramType.Y_JCE -> {
|
||||
Request.fetchYJceEPG(tvViewModel)
|
||||
}
|
||||
|
||||
ProgramType.F -> {
|
||||
Request.fetchFEPG(tvViewModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,22 +15,23 @@ import com.lizongying.mytv.api.Info
|
||||
import com.lizongying.mytv.api.InfoV2
|
||||
import com.lizongying.mytv.api.LiveInfo
|
||||
import com.lizongying.mytv.api.LiveInfoRequest
|
||||
import com.lizongying.mytv.api.Token
|
||||
import com.lizongying.mytv.api.YSP
|
||||
import com.lizongying.mytv.api.YSPApiService
|
||||
import com.lizongying.mytv.api.YSPBtraceService
|
||||
import com.lizongying.mytv.api.YSPJceService
|
||||
import com.lizongying.mytv.api.YSPProtoService
|
||||
import com.lizongying.mytv.api.YSPTokenService
|
||||
import com.lizongying.mytv.models.TVViewModel
|
||||
import com.lizongying.mytv.proto.Ysp.cn.yangshipin.oms.common.proto.pageModel
|
||||
import com.lizongying.mytv.proto.Ysp.cn.yangshipin.omstv.common.proto.epgProgramModel
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.TVTimeShiftProgramRequest
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.TVTimeShiftProgramResponse
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import javax.crypto.Cipher
|
||||
import javax.crypto.spec.IvParameterSpec
|
||||
import javax.crypto.spec.SecretKeySpec
|
||||
import kotlin.math.max
|
||||
|
||||
|
||||
object Request {
|
||||
@@ -39,16 +40,18 @@ object Request {
|
||||
private var yspApiService: YSPApiService = ApiClient().yspApiService
|
||||
private var yspBtraceService: YSPBtraceService = ApiClient().yspBtraceService
|
||||
private var yspProtoService: YSPProtoService = ApiClient().yspProtoService
|
||||
private var yspJceService: YSPJceService = ApiClient().yspJceService
|
||||
private var fAuthService: FAuthService = ApiClient().fAuthService
|
||||
|
||||
private var openid = ""
|
||||
private var token = ""
|
||||
private var tokenFH = ""
|
||||
|
||||
private var needAuth = false
|
||||
private var needToken = false
|
||||
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
private lateinit var btraceRunnable: BtraceRunnable
|
||||
private var tokenRunnable: TokenRunnable = TokenRunnable()
|
||||
|
||||
private val regex = Regex("""des_key = "([^"]+).+var des_iv = "([^"]+)""")
|
||||
private val input =
|
||||
@@ -59,16 +62,8 @@ object Request {
|
||||
private var initRetryTimes = 0
|
||||
private var initRetryMaxTimes = 0
|
||||
|
||||
private var openid = "vu0-8lgGV2LW9QjDeucB9H12d_6HQWmTFgqCWg5o-VBQN4"
|
||||
|
||||
fun onCreate() {
|
||||
Log.i(TAG, "onCreate")
|
||||
fetchInfoV2()
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
Log.i(TAG, "onDestroy")
|
||||
handler.removeCallbacks(tokenRunnable)
|
||||
}
|
||||
|
||||
private var call: Call<LiveInfo>? = null
|
||||
@@ -77,6 +72,8 @@ object Request {
|
||||
private var callFAuth: Call<FAuth>? = null
|
||||
private var callPage: Call<pageModel.Response>? = null
|
||||
|
||||
private var callBtracePage: Call<Void>? = null
|
||||
|
||||
private fun cancelCall() {
|
||||
call?.cancel()
|
||||
callAuth?.cancel()
|
||||
@@ -107,13 +104,14 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchAuth(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchAuth(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchAuth(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchAuth(tvModel, cookie)
|
||||
@@ -125,13 +123,14 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchAuth(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchAuth(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchAuth(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchAuth(tvModel, cookie)
|
||||
@@ -145,13 +144,14 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchAuth(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchAuth(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchAuth(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchAuth(tvModel, cookie)
|
||||
@@ -213,15 +213,16 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
// fetchAuth(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchVideo(tvModel, cookie)
|
||||
// fetchAuth(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
// fetchAuth(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchVideo(tvModel, cookie)
|
||||
@@ -238,15 +239,16 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
// fetchAuth(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchVideo(tvModel, cookie)
|
||||
// fetchAuth(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
// fetchAuth(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchVideo(tvModel, cookie)
|
||||
@@ -260,15 +262,16 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
// fetchAuth(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchVideo(tvModel, cookie)
|
||||
// fetchAuth(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
// fetchAuth(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchVideo(tvModel, cookie)
|
||||
@@ -283,13 +286,14 @@ object Request {
|
||||
if (tvModel.retryTimes < tvModel.retryMaxTimes) {
|
||||
tvModel.retryTimes++
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (tvModel.tokenYSPRetryTimes == tvModel.tokenYSPRetryMaxTimes) {
|
||||
if (needToken && tvModel.tokenYSPRetryTimes < tvModel.tokenYSPRetryMaxTimes) {
|
||||
tvModel.tokenYSPRetryTimes++
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
} else {
|
||||
if (!tvModel.getTV().mustToken) {
|
||||
fetchVideo(tvModel, cookie)
|
||||
}
|
||||
} else {
|
||||
tvModel.needGetToken = true
|
||||
fetchVideo(tvModel)
|
||||
}
|
||||
} else {
|
||||
fetchVideo(tvModel, cookie)
|
||||
@@ -456,7 +460,7 @@ object Request {
|
||||
return
|
||||
}
|
||||
|
||||
if (tvModel.getTV().needToken) {
|
||||
if (needToken && tvModel.getTV().needToken) {
|
||||
if (token == "") {
|
||||
tvModel.needGetToken = true
|
||||
}
|
||||
@@ -476,12 +480,6 @@ object Request {
|
||||
}
|
||||
}
|
||||
|
||||
class TokenRunnable : Runnable {
|
||||
override fun run() {
|
||||
// fetchToken()
|
||||
}
|
||||
}
|
||||
|
||||
private fun fetchInfoV2() {
|
||||
yspTokenService.getInfoV2()
|
||||
.enqueue(object : Callback<InfoV2> {
|
||||
@@ -498,24 +496,6 @@ object Request {
|
||||
if (!t.isNullOrEmpty()) {
|
||||
token = t
|
||||
Log.i(TAG, "token success $token")
|
||||
if (e != null) {
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
max(30 * 60 * 1000, (e - 1500) * 1000).toLong()
|
||||
)
|
||||
} else {
|
||||
Log.e(TAG, "e empty")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "token empty")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
}
|
||||
if (!f.isNullOrEmpty()) {
|
||||
tokenFH = f
|
||||
@@ -528,10 +508,6 @@ object Request {
|
||||
listener?.onRequestFinished(null)
|
||||
} else {
|
||||
Log.e(TAG, "token status error")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
if (initRetryTimes < initRetryMaxTimes) {
|
||||
initRetryTimes++
|
||||
fetchInfoV2()
|
||||
@@ -543,11 +519,6 @@ object Request {
|
||||
|
||||
override fun onFailure(call: Call<InfoV2>, t: Throwable) {
|
||||
Log.e(TAG, "token request error $t")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
|
||||
if (initRetryTimes < initRetryMaxTimes) {
|
||||
initRetryTimes++
|
||||
fetchInfoV2()
|
||||
@@ -558,68 +529,20 @@ object Request {
|
||||
})
|
||||
}
|
||||
|
||||
fun fetchToken() {
|
||||
yspTokenService.getToken(token)
|
||||
.enqueue(object : Callback<Token> {
|
||||
override fun onResponse(call: Call<Token>, response: Response<Token>) {
|
||||
if (response.isSuccessful) {
|
||||
val t = response.body()?.t
|
||||
val e = response.body()?.e
|
||||
if (!t.isNullOrEmpty()) {
|
||||
token = t
|
||||
Log.e(TAG, "token success $token")
|
||||
if (e != null) {
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
max(30 * 60 * 1000, (e - 1500) * 1000).toLong()
|
||||
)
|
||||
} else {
|
||||
Log.e(TAG, "e empty")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "token empty")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "token status error")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Token>, t: Throwable) {
|
||||
Log.e(TAG, "token request error $t")
|
||||
handler.postDelayed(
|
||||
tokenRunnable,
|
||||
30 * 60 * 1000
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
class BtraceRunnable(private val tvModel: TVViewModel) : Runnable {
|
||||
override fun run() {
|
||||
fetchBtrace(tvModel)
|
||||
handler.postDelayed(this, 60000)
|
||||
}
|
||||
}
|
||||
|
||||
fun fetchBtrace(tvModel: TVViewModel) {
|
||||
callBtracePage?.cancel()
|
||||
val title = tvModel.getTV().title
|
||||
|
||||
val guid = YSP.getGuid()
|
||||
val pid = tvModel.getTV().pid
|
||||
val sid = tvModel.getTV().sid
|
||||
yspBtraceService.kvcollect(
|
||||
callBtracePage = yspBtraceService.kvcollect(
|
||||
c_timestamp = YSP.generateGuid(),
|
||||
guid = guid,
|
||||
c_guid = guid,
|
||||
@@ -632,19 +555,21 @@ object Request {
|
||||
ftime = getDateFormat("yyyy-MM-dd HH:mm:ss"),
|
||||
seq = tvModel.seq.toString(),
|
||||
)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
if (response.isSuccessful) {
|
||||
// Log.d(TAG, "$title kvcollect success")
|
||||
} else {
|
||||
Log.e(TAG, "$title kvcollect status error")
|
||||
}
|
||||
callBtracePage?.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
if (response.isSuccessful) {
|
||||
// Log.d(TAG, "$title kvcollect success")
|
||||
} else {
|
||||
Log.e(TAG, "$title kvcollect status error")
|
||||
}
|
||||
handler.postDelayed(btraceRunnable, 60 * 1000)
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
Log.e(TAG, "$title kvcollect request error")
|
||||
}
|
||||
})
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
Log.e(TAG, "$title kvcollect request error")
|
||||
handler.postDelayed(btraceRunnable, 60 * 1000)
|
||||
}
|
||||
})
|
||||
tvModel.seq++
|
||||
}
|
||||
|
||||
@@ -683,9 +608,34 @@ object Request {
|
||||
})
|
||||
}
|
||||
|
||||
fun fetchYEPG(tvViewModel: TVViewModel) {
|
||||
fun fetchYJceEPG(tvViewModel: TVViewModel) {
|
||||
val title = tvViewModel.getTV().title
|
||||
yspProtoService.getProgram(tvViewModel.getTV().programId, getDateFormat("yyyyMMdd"))
|
||||
yspJceService.getProgram(TVTimeShiftProgramRequest(tvViewModel.getTV().pid))
|
||||
.enqueue(object : Callback<TVTimeShiftProgramResponse> {
|
||||
override fun onResponse(
|
||||
call: Call<TVTimeShiftProgramResponse>,
|
||||
response: Response<TVTimeShiftProgramResponse>
|
||||
) {
|
||||
if (response.isSuccessful) {
|
||||
val program = response.body()
|
||||
if (program != null) {
|
||||
tvViewModel.addYJceEPG(program.programs)
|
||||
Log.d(TAG, "$title program ${program.programs.size}")
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "$title program error")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<TVTimeShiftProgramResponse>, t: Throwable) {
|
||||
Log.e(TAG, "$title program request failed $t")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun fetchYProtoEPG(tvViewModel: TVViewModel) {
|
||||
val title = tvViewModel.getTV().title
|
||||
yspProtoService.getProgram(tvViewModel.getTV().pid, getDateFormat("yyyyMMdd"))
|
||||
.enqueue(object : Callback<epgProgramModel.Response> {
|
||||
override fun onResponse(
|
||||
call: Call<epgProgramModel.Response>,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.lizongying.mytv
|
||||
|
||||
import com.lizongying.mytv.models.ProgramType
|
||||
import java.io.Serializable
|
||||
|
||||
data class TV(
|
||||
@@ -11,7 +12,7 @@ data class TV(
|
||||
var logo: Any = "",
|
||||
var pid: String = "",
|
||||
var sid: String = "",
|
||||
var programId: String = "",
|
||||
var programType: ProgramType,
|
||||
var needToken: Boolean = false,
|
||||
var mustToken: Boolean = false,
|
||||
|
||||
@@ -25,7 +26,7 @@ data class TV(
|
||||
", logo='" + logo + '\'' +
|
||||
", pid='" + pid + '\'' +
|
||||
", sid='" + sid + '\'' +
|
||||
", programId='" + programId + '\'' +
|
||||
", programType='" + programType + '\'' +
|
||||
'}'
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.lizongying.mytv
|
||||
|
||||
import com.lizongying.mytv.models.ProgramType
|
||||
|
||||
object TVList {
|
||||
val list: Map<String, List<TV>> by lazy {
|
||||
setup()
|
||||
@@ -17,12 +19,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/d57905b93540bd15f0c48230dbbbff7ee0d645ff539e38866e2d15c8b9f7dfcd.png?imageMogr2/format/webp",
|
||||
"600001859",
|
||||
"2022576801",
|
||||
"600001859",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
1,
|
||||
0,
|
||||
"CCTV2 财经",
|
||||
"CCTV2",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226195/index.m3u8"),
|
||||
@@ -30,12 +32,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/20115388de0207131af17eac86c33049b95d69eaff064e55653a1b941810a006.png?imageMogr2/format/webp",
|
||||
"600001800",
|
||||
"2022576701",
|
||||
"600001800",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
2,
|
||||
0,
|
||||
"CCTV3 综艺",
|
||||
"CCTV3",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226397/index.m3u8"),
|
||||
@@ -43,12 +45,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/7b7a65c712450da3deb6ca66fbacf4f9aee00d3f20bd80eafb5ada01ec63eb3a.png?imageMogr2/format/webp",
|
||||
"600001801",
|
||||
"2022576501",
|
||||
"600001801",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
3,
|
||||
0,
|
||||
"CCTV4 中文国际",
|
||||
"CCTV4",
|
||||
listOf(
|
||||
@@ -59,12 +61,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/f357e58fdbcc076a3d65e1f958c942b2e14f14342c60736ceed98b092d35356a.png?imageMogr2/format/webp",
|
||||
"600001814",
|
||||
"2022576601",
|
||||
"600001814",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
4,
|
||||
0,
|
||||
"CCTV5 体育",
|
||||
"CCTV5",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226395/index.m3u8"),
|
||||
@@ -72,12 +74,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/0a6a7138952675983a3d854df7688557b286d59aa06166edae51506f9204d655.png?imageMogr2/format/webp",
|
||||
"600001818",
|
||||
"2022576401",
|
||||
"600001818",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
5,
|
||||
0,
|
||||
"CCTV6 电影",
|
||||
"CCTV6",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226393/index.m3u8"),
|
||||
@@ -85,12 +87,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/741515efda91f03f455df8a7da4ee11fa9329139c276435cf0a9e2af398d5bf2.png?imageMogr2/format/webp",
|
||||
"600108442",
|
||||
"2013693901",
|
||||
"600001802",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
6,
|
||||
0,
|
||||
"CCTV7 国防军事",
|
||||
"CCTV7",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226192/index.m3u8"),
|
||||
@@ -98,12 +100,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/b29af94e295ebdf646cefb68122c429b9cd921f498ca20d2d8070252536f9ff9.png?imageMogr2/format/webp",
|
||||
"600004092",
|
||||
"2022576201",
|
||||
"600004092",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
7,
|
||||
0,
|
||||
"CCTV8 电视剧",
|
||||
"CCTV8",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226391/index.m3u8"),
|
||||
@@ -111,12 +113,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/ad51de94426a0ba039e6dd6a8534ea98ecc813a6176bde87b4f18cc34d6d7590.png?imageMogr2/format/webp",
|
||||
"600001803",
|
||||
"2022576101",
|
||||
"600001803",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
8,
|
||||
0,
|
||||
"CCTV9 纪录",
|
||||
"CCTV9",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226197/index.m3u8"),
|
||||
@@ -124,12 +126,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/2ed1b4deeca179d5db806bb941790f82eb92a1b7299c1c38fe027f95a5caee5e.png?imageMogr2/format/webp",
|
||||
"600004078",
|
||||
"2022576001",
|
||||
"600004078",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
9,
|
||||
0,
|
||||
"CCTV10 科教",
|
||||
"CCTV10",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226189/index.m3u8"),
|
||||
@@ -137,12 +139,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/aa6157ec65188cd41826e5a2f088c3d6d153205f5f6428258d12c59999e221aa.png?imageMogr2/format/webp",
|
||||
"600001805",
|
||||
"2022573001",
|
||||
"600001805",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
10,
|
||||
0,
|
||||
"CCTV11 戏曲",
|
||||
"CCTV11",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226240/index.m3u8"),
|
||||
@@ -150,12 +152,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/ed12ed7c7a1034dae4350011fe039284c5d5a836506b28c9e32e3c75299625c0.png?imageMogr2/format/webp",
|
||||
"600001806",
|
||||
"2022575901",
|
||||
"600001806",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
11,
|
||||
0,
|
||||
"CCTV12 社会与法",
|
||||
"CCTV12",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226190/index.m3u8"),
|
||||
@@ -163,12 +165,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/484083cffaa40df7e659565e8cb4d1cc740158a185512114167aa21fa0c59240.png?imageMogr2/format/webp",
|
||||
"600001807",
|
||||
"2022575801",
|
||||
"600001807",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
12,
|
||||
0,
|
||||
"CCTV13 新闻",
|
||||
"CCTV13",
|
||||
listOf(
|
||||
@@ -178,12 +180,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/266da7b43c03e2312186b4a999e0f060e8f15b10d2cc2c9aa32171819254cf1a.png?imageMogr2/format/webp",
|
||||
"600001811",
|
||||
"2022575701",
|
||||
"600001811",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
13,
|
||||
0,
|
||||
"CCTV14 少儿",
|
||||
"CCTV14",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226193/index.m3u8"),
|
||||
@@ -191,12 +193,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/af6b603896938dc346fbb16abfc63c12cba54b0ec9d18770a15d347d115f12d5.png?imageMogr2/format/webp",
|
||||
"600001809",
|
||||
"2022575601",
|
||||
"600001809",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
14,
|
||||
0,
|
||||
"CCTV15 音乐",
|
||||
"CCTV15",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225785/index.m3u8"),
|
||||
@@ -204,12 +206,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/2ceee92188ef684efe0d8b90839c4f3ad450d179dc64d59beff417059453af47.png?imageMogr2/format/webp",
|
||||
"600001815",
|
||||
"2022575501",
|
||||
"600001815",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
15,
|
||||
0,
|
||||
"CCTV16 奥林匹克",
|
||||
"CCTV16-HD",
|
||||
listOf(
|
||||
@@ -220,12 +222,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/53793fa7bacd3a93ff6dc5d2758418985e1f952a316c335d663b572d8bdcd74d.png?imageMogr2/format/webp",
|
||||
"600098637",
|
||||
"2022575401",
|
||||
"600098637",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
16,
|
||||
0,
|
||||
"CCTV17 农业农村",
|
||||
"CCTV17",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226198/index.m3u8"),
|
||||
@@ -233,12 +235,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/ddef563072f8bad2bea5b9e52674cb7b4ed50efb20c26e61994dfbdf05c1e3c0.png?imageMogr2/format/webp",
|
||||
"600001810",
|
||||
"2022575301",
|
||||
"600001810",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
17,
|
||||
0,
|
||||
"CCTV5+ 体育赛事",
|
||||
"CCTV5+",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226221/index.m3u8"),
|
||||
@@ -246,12 +248,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/649ad76a90bfef55b05db9fe52e006487280f619089099d5dc971e387fc6eff0.png?imageMogr2/format/webp",
|
||||
"600001817",
|
||||
"2022576301",
|
||||
"600001817",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
18,
|
||||
0,
|
||||
"CCTV4K 超高清",
|
||||
"CCTV4K",
|
||||
listOf(),
|
||||
@@ -259,12 +261,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/3e9d06fd7244d950df5838750f1c6ac3456e172b51caca2c16d2282125b111e8.png?imageMogr2/format/webp",
|
||||
"600002264",
|
||||
"2022575201",
|
||||
"600002264",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
19,
|
||||
0,
|
||||
"CCTV8K 超高清",
|
||||
"CCTV8K",
|
||||
listOf(),
|
||||
@@ -272,12 +274,12 @@ object TVList {
|
||||
R.drawable.cctv8k,
|
||||
"600156816",
|
||||
"2020603421",
|
||||
"",
|
||||
ProgramType.Y_JCE,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
20,
|
||||
0,
|
||||
"风云剧场",
|
||||
"CCTV风云剧场频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226950/index.m3u8"),
|
||||
@@ -285,12 +287,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/4d549e53e6d0f632d5a633d1945280797b153e588f919221a07faa869812cc89.png?imageMogr2/format/webp",
|
||||
"600099658",
|
||||
"2012513603",
|
||||
"600099658",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
21,
|
||||
0,
|
||||
"第一剧场",
|
||||
"CCTV第一剧场频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226959/index.m3u8"),
|
||||
@@ -298,12 +300,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/a556bd7d93ce65e18f243a8892b5604f4faa994a4897315914216a710a706208.png?imageMogr2/format/webp",
|
||||
"600099655",
|
||||
"2012514403",
|
||||
"600099655",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
22,
|
||||
0,
|
||||
"怀旧剧场",
|
||||
"CCTV怀旧剧场频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226972/index.m3u8"),
|
||||
@@ -311,12 +313,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/5661bd04fecdb6e899f801147a22ab5d3a475bf2b62e30aec2c0023190ebc9b1.png?imageMogr2/format/webp",
|
||||
"600099620",
|
||||
"2012511203",
|
||||
"600099620",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
23,
|
||||
0,
|
||||
"世界地理",
|
||||
"CCTV世界地理频道",
|
||||
listOf(),
|
||||
@@ -324,12 +326,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/bb3c6c9e145d698137f5bb64a582021a01b51344b929003630eb769ea65832a9.png?imageMogr2/format/webp",
|
||||
"600099637",
|
||||
"2012513303",
|
||||
"600099637",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
24,
|
||||
0,
|
||||
"风云音乐",
|
||||
"CCTV风云音乐频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226953/index.m3u8"),
|
||||
@@ -337,12 +339,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/bbf1d024c5228b8dd128b0e3cb1717d173fab4ee84c3a4c8a57b1a215362ca3b.png?imageMogr2/format/webp",
|
||||
"600099660",
|
||||
"2012514103",
|
||||
"600099660",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
25,
|
||||
0,
|
||||
"兵器科技",
|
||||
"CCTV兵器科技频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226975/index.m3u8"),
|
||||
@@ -350,12 +352,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/4c6b6a6d3839889f34d33db3c2f80233b26b74d3489b393487635f8704e70796.png?imageMogr2/format/webp",
|
||||
"600099649",
|
||||
"2012513403",
|
||||
"600099649",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
26,
|
||||
0,
|
||||
"风云足球",
|
||||
"CCTV风云足球频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226984/index.m3u8"),
|
||||
@@ -363,12 +365,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/cd1e2bb52b06a991de168733e5ff0f1d85adc8042d40c8f393f723543e5dd08a.png?imageMogr2/format/webp",
|
||||
"600099636",
|
||||
"2012514203",
|
||||
"600099636",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
27,
|
||||
0,
|
||||
"高尔夫网球",
|
||||
"CCTV高尔夫·网球频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226978/index.m3u8"),
|
||||
@@ -376,12 +378,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/cdd1b31ede7a5ad049ed53d9a072422f829e72dd062ed2c19e077fdd01699071.png?imageMogr2/format/webp",
|
||||
"600099659",
|
||||
"2012512503",
|
||||
"600099659",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
28,
|
||||
0,
|
||||
"女性时尚",
|
||||
"CCTV女性时尚频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226969/index.m3u8"),
|
||||
@@ -389,12 +391,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/fa28955ce8b2539d728bf4c6a13a46ff57ad76eae46627f7bcfb1ed8a613d3fc.png?imageMogr2/format/webp",
|
||||
"600099650",
|
||||
"2012513903",
|
||||
"600099650",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
29,
|
||||
0,
|
||||
"央视文化精品",
|
||||
"CCTV央视文化精品频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226981/index.m3u8"),
|
||||
@@ -402,12 +404,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/14ac5ce40482cacd3d4b37435222bfe86af2b452a2f04ecbfc1d13d76edd7c57.png?imageMogr2/format/webp",
|
||||
"600099653",
|
||||
"2012513803",
|
||||
"600099653",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
30,
|
||||
0,
|
||||
"央视台球",
|
||||
"CCTV央视台球频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226956/index.m3u8"),
|
||||
@@ -415,12 +417,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/10e14a92478011aa6c3c8562e62127f3b1908e29fcd78e4b2b24b9e6d3ec2fbc.png?imageMogr2/format/webp",
|
||||
"600099652",
|
||||
"2012513703",
|
||||
"600099652",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
31,
|
||||
0,
|
||||
"电视指南",
|
||||
"CCTV电视指南频道",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226987/index.m3u8"),
|
||||
@@ -428,12 +430,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/244d72c0eb1615ed7d51c2f5db5a67f306aa3f58c05bc2d34de3aa7e956dc8c9.png?imageMogr2/format/webp",
|
||||
"600099656",
|
||||
"2012514003",
|
||||
"600099656",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
TV(
|
||||
32,
|
||||
0,
|
||||
"卫生健康",
|
||||
"CCTV卫生健康频道",
|
||||
listOf(),
|
||||
@@ -441,14 +443,14 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/54a6863656fdfd8f803be193ddf22441c5000a108833889816fd2d8911715ce8.png?imageMogr2/format/webp",
|
||||
"600099651",
|
||||
"2012513503",
|
||||
"600099651",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
),
|
||||
),
|
||||
"地方" to listOf(
|
||||
TV(
|
||||
33,
|
||||
0,
|
||||
"东方卫视",
|
||||
"东方卫视",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226217/index.m3u8"),
|
||||
@@ -456,12 +458,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/9bd372ca292a82ce3aa08772b07efc4af1f85c21d1f268ea33440c49e9a0a488.png?imageMogr2/format/webp",
|
||||
"600002483",
|
||||
"2000292403",
|
||||
"600002483",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
34,
|
||||
0,
|
||||
"湖南卫视",
|
||||
"湖南卫视",
|
||||
listOf(
|
||||
@@ -472,12 +474,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/4120e89d3079d08aa17d382f69a2308ec70839b278367763c34a34666c75cb88.png?imageMogr2/format/webp",
|
||||
"600002475",
|
||||
"2000296203",
|
||||
"600002475",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
35,
|
||||
0,
|
||||
"湖北卫视",
|
||||
"湖北卫视",
|
||||
listOf(
|
||||
@@ -488,12 +490,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/7a6be5a2bb1dc53a945c016ff1f525dc4a84c51db371c15c89aa55404b0ba784.png?imageMogr2/format/webp",
|
||||
"600002508",
|
||||
"2000294503",
|
||||
"600002508",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
36,
|
||||
0,
|
||||
"辽宁卫视",
|
||||
"辽宁卫视",
|
||||
listOf(
|
||||
@@ -504,12 +506,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/ac4ed6058a87c101ae7147ebc38905d0cae047fb73fd277ee5049b84f52bda36.png?imageMogr2/format/webp",
|
||||
"600002505",
|
||||
"2000281303",
|
||||
"600002505",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
37,
|
||||
0,
|
||||
"江苏卫视",
|
||||
"江苏卫视",
|
||||
listOf(
|
||||
@@ -520,12 +522,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/380ad685c0c1d5b2c902246b8d2df6d3f9b45e2837abcfe493075bbded597a31.png?imageMogr2/format/webp",
|
||||
"600002521",
|
||||
"2000295603",
|
||||
"600002521",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
38,
|
||||
0,
|
||||
"江西卫视",
|
||||
"江西卫视",
|
||||
listOf(
|
||||
@@ -536,12 +538,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/3c760d0d00463855890e8a1864ea4a6b6dd66b90c29b4ac714a4b17c16519871.png?imageMogr2/format/webp",
|
||||
"600002503",
|
||||
"2000294103",
|
||||
"600002503",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
39,
|
||||
0,
|
||||
"山东卫视",
|
||||
"山东卫视",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226209/index.m3u8"),
|
||||
@@ -549,12 +551,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/22d403f07a7cf5410b3ad3ddb65a11aa229a32475fac213f5344c9f0ec330ca1.png?imageMogr2/format/webp",
|
||||
"600002513",
|
||||
"2000294803",
|
||||
"600002513",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
40,
|
||||
0,
|
||||
"广东卫视",
|
||||
"广东卫视",
|
||||
listOf("http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226216/index.m3u8"),
|
||||
@@ -562,12 +564,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/28886880a4dc0f06fb7e0a528a1def0591d61a65870e29176ede0cc92033bbfd.png?imageMogr2/format/webp",
|
||||
"600002485",
|
||||
"2000292703",
|
||||
"600002485",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
41,
|
||||
0,
|
||||
"广西卫视",
|
||||
"广西卫视",
|
||||
listOf(
|
||||
@@ -578,12 +580,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/54b7e97cb816bb223fe05f3fc44da2c7820eb66e8550c19d23100f2c414ecc38.png?imageMogr2/format/webp",
|
||||
"600002509",
|
||||
"2000294203",
|
||||
"600002509",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
42,
|
||||
0,
|
||||
"重庆卫视",
|
||||
"重庆卫视",
|
||||
listOf(
|
||||
@@ -594,12 +596,12 @@ object TVList {
|
||||
R.drawable.chongqing,
|
||||
"600002531",
|
||||
"2000297803",
|
||||
"600002531",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
43,
|
||||
0,
|
||||
"河南卫视",
|
||||
"河南卫视",
|
||||
listOf(
|
||||
@@ -610,12 +612,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/74925962148a6d31c85808b6cd4e444c2a54bab393d2c5fc85e960b50e22fa86.png?imageMogr2/format/webp",
|
||||
"600002525",
|
||||
"2000296103",
|
||||
"600002525",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
44,
|
||||
0,
|
||||
"河北卫视",
|
||||
"河北卫视",
|
||||
listOf(
|
||||
@@ -626,12 +628,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/d545becdc81c60197b08c7f47380705e4665ed3fe55efc8b855e486f6e655378.png?imageMogr2/format/webp",
|
||||
"600002493",
|
||||
"2000293403",
|
||||
"600002493",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
45,
|
||||
0,
|
||||
"贵州卫视",
|
||||
"贵州卫视",
|
||||
listOf(
|
||||
@@ -642,12 +644,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/4eb45f4781d33d872af027dc01c941559aab55667dd99cc5c22bef7037807b13.png?imageMogr2/format/webp",
|
||||
"600002490",
|
||||
"2000293303",
|
||||
"600002490",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
46,
|
||||
0,
|
||||
"北京卫视",
|
||||
"北京卫视",
|
||||
listOf(
|
||||
@@ -658,12 +660,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/f4f23633c578beea49a3841d88d3490100f029ee349059fa532869db889872c5.png?imageMogr2/format/webp",
|
||||
"600002309",
|
||||
"2000272103",
|
||||
"600002309",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
47,
|
||||
0,
|
||||
"黑龙江卫视",
|
||||
"黑龙江卫视",
|
||||
listOf(
|
||||
@@ -674,12 +676,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/d8273ae9be698ce2db21f5b886ecac95a73429593f93713c60ed8c12c38bf0d3.png?imageMogr2/format/webp",
|
||||
"600002498",
|
||||
"2000293903",
|
||||
"600002498",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
48,
|
||||
0,
|
||||
"浙江卫视",
|
||||
"浙江卫视",
|
||||
listOf(
|
||||
@@ -690,12 +692,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/a66c836bd98ba3e41a2e9a570d4b9c50dedc6839e9de333e2e78212ad505f37e.png?imageMogr2/format/webp",
|
||||
"600002520",
|
||||
"2000295503",
|
||||
"600002520",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
49,
|
||||
0,
|
||||
"安徽卫视",
|
||||
"安徽卫视",
|
||||
listOf(
|
||||
@@ -706,12 +708,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/f35fa04b51b1ee4984b03578b65403570868ebca03c6c01e11b097f999a58d9b.png?imageMogr2/format/webp",
|
||||
"600002532",
|
||||
"2000298003",
|
||||
"600002532",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
50,
|
||||
0,
|
||||
"深圳卫视",
|
||||
"深圳卫视",
|
||||
listOf(
|
||||
@@ -722,12 +724,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/d59fec04c902e3581c617136d02d4b9b8c4cbe64272781ddd3525e80c823edb7.png?imageMogr2/format/webp",
|
||||
"600002481",
|
||||
"2000292203",
|
||||
"600002481",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
51,
|
||||
0,
|
||||
"四川卫视",
|
||||
"四川卫视",
|
||||
listOf(
|
||||
@@ -738,12 +740,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/3276a414ae0eaa0f116f2045cd913367967d0c7c1e978e8621ac3879436c6ed7.png?imageMogr2/format/webp",
|
||||
"600002516",
|
||||
"2000295003",
|
||||
"600002516",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
52,
|
||||
0,
|
||||
"东南卫视",
|
||||
"福建东南卫视",
|
||||
listOf(
|
||||
@@ -754,12 +756,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/3208fe6564a293c21b711333fb3edb05bb5b406cff840573c9a8d839680a1579.png?imageMogr2/format/webp",
|
||||
"600002484",
|
||||
"2000292503",
|
||||
"600002484",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
53,
|
||||
0,
|
||||
"海南卫视",
|
||||
"海南卫视",
|
||||
listOf(
|
||||
@@ -770,12 +772,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/6e060391fde0469801fc3d84dbf204b4f8d650d251f17d7595a6964c0bb99e81.png?imageMogr2/format/webp",
|
||||
"600002506",
|
||||
"2000291503",
|
||||
"600002506",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
54,
|
||||
0,
|
||||
"天津卫视",
|
||||
"天津卫视",
|
||||
listOf(),
|
||||
@@ -783,12 +785,12 @@ object TVList {
|
||||
R.drawable.tianjin,
|
||||
"600152137",
|
||||
"2019927003",
|
||||
"",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
55,
|
||||
0,
|
||||
"新疆卫视",
|
||||
"新疆卫视",
|
||||
listOf(),
|
||||
@@ -796,12 +798,12 @@ object TVList {
|
||||
R.drawable.xinjiang,
|
||||
"600152138",
|
||||
"2019927403",
|
||||
"",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
56,
|
||||
0,
|
||||
"兵团卫视",
|
||||
"兵团卫视",
|
||||
listOf(),
|
||||
@@ -809,12 +811,12 @@ object TVList {
|
||||
R.drawable.bingtuan,
|
||||
"600170344",
|
||||
"2022606701",
|
||||
"",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
57,
|
||||
0,
|
||||
"CETV1",
|
||||
"CETV1",
|
||||
listOf(),
|
||||
@@ -822,14 +824,14 @@ object TVList {
|
||||
R.drawable.cetv1,
|
||||
"600171827",
|
||||
"2022823801",
|
||||
"",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
),
|
||||
),
|
||||
"港澳台" to listOf(
|
||||
TV(
|
||||
58,
|
||||
0,
|
||||
"凤凰卫视资讯台",
|
||||
"",
|
||||
listOf(),
|
||||
@@ -837,12 +839,12 @@ object TVList {
|
||||
"http://c1.fengshows-cdn.com/a/2021_22/79dcc3a9da358a3.png",
|
||||
"7c96b084-60e1-40a9-89c5-682b994fb680",
|
||||
"",
|
||||
"",
|
||||
ProgramType.F,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
59,
|
||||
0,
|
||||
"凤凰卫视中文台",
|
||||
"",
|
||||
listOf(),
|
||||
@@ -850,12 +852,12 @@ object TVList {
|
||||
"http://c1.fengshows-cdn.com/a/2021_22/ede3d9e09be28e5.png",
|
||||
"f7f48462-9b13-485b-8101-7b54716411ec",
|
||||
"",
|
||||
"",
|
||||
ProgramType.F,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
60,
|
||||
0,
|
||||
"凤凰卫视香港台",
|
||||
"",
|
||||
listOf(),
|
||||
@@ -863,14 +865,14 @@ object TVList {
|
||||
"http://c1.fengshows-cdn.com/a/2021_23/325d941090bee17.png",
|
||||
"15e02d92-1698-416c-af2f-3e9a872b4d78",
|
||||
"",
|
||||
"",
|
||||
ProgramType.F,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
),
|
||||
"国际" to listOf(
|
||||
TV(
|
||||
61,
|
||||
0,
|
||||
"CGTN",
|
||||
"CGTN",
|
||||
listOf("http://live.cgtn.com/1000/prog_index.m3u8"),
|
||||
@@ -878,12 +880,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/a72dff758ca1c17cd0ecc8cedc11b893d208f409d5e6302faa0e9d298848abc3.png?imageMogr2/format/webp",
|
||||
"600014550",
|
||||
"2022575001",
|
||||
"600014550",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
62,
|
||||
0,
|
||||
"CGTN 法语频道",
|
||||
"CGTN法语频道",
|
||||
listOf("https://livefr.cgtn.com/1000f/prog_index.m3u8"),
|
||||
@@ -891,12 +893,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/a8d0046a47433d952bf6ed17062deb8bd2184ba9aec0f7781df6bf9487a3ffcf.png?imageMogr2/format/webp",
|
||||
"600084704",
|
||||
"2022574901",
|
||||
"600084704",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
63,
|
||||
0,
|
||||
"CGTN 俄语频道",
|
||||
"CGTN俄语频道",
|
||||
listOf("http://liveru.cgtn.com/1000r/prog_index.m3u8"),
|
||||
@@ -904,12 +906,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/bf0a820893cbaf20dd0333e27042e1ef9c8806e5b602b6a8c95af399db0bc77a.png?imageMogr2/format/webp",
|
||||
"600084758",
|
||||
"2022574801",
|
||||
"600084758",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
64,
|
||||
0,
|
||||
"CGTN 阿拉伯语频道",
|
||||
"CGTN阿拉伯语频道",
|
||||
listOf("http://livear.cgtn.com/1000a/prog_index.m3u8"),
|
||||
@@ -917,12 +919,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202306/2e44e2aa3e7a1cedf07fd0ae59fe69e86a60a2632660a006e3e9e7397b2d107e.png?imageMogr2/format/webp",
|
||||
"600084782",
|
||||
"2022574601",
|
||||
"600084782",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
65,
|
||||
0,
|
||||
"CGTN 西班牙语频道",
|
||||
"CGTN西班牙语频道",
|
||||
listOf(
|
||||
@@ -933,12 +935,12 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202309/7c337e3dbe64402ec7e4678a619a4a6d95144e42f35161181ff78e143b7cf67a.png?imageMogr2/format/webp",
|
||||
"600084744",
|
||||
"2022571701",
|
||||
"600084744",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
TV(
|
||||
66,
|
||||
0,
|
||||
"CGTN 纪录频道",
|
||||
"CGTN外语纪录频道",
|
||||
listOf("https://livedoc.cgtn.com/500d/prog_index.m3u8"),
|
||||
@@ -946,21 +948,31 @@ object TVList {
|
||||
"https://resources.yangshipin.cn/assets/oms/image/202309/74d3ac436a7e374879578de1d87a941fbf566d39d5632b027c5097891ed32bd5.png?imageMogr2/format/webp",
|
||||
"600084781",
|
||||
"2022574701",
|
||||
"600084781",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
),
|
||||
)
|
||||
)
|
||||
var id = 0
|
||||
list.forEach { (_, v) ->
|
||||
v.forEach { v1 ->
|
||||
v1.id = id
|
||||
id++
|
||||
}
|
||||
}
|
||||
|
||||
val array = arrayOf("央视", "地方")
|
||||
// list = list.filterKeys { it in array }
|
||||
return list
|
||||
|
||||
val listNew = mutableMapOf<String, List<TV>>()
|
||||
var id = 0
|
||||
list.forEach { (k, v) ->
|
||||
val group = mutableListOf<TV>()
|
||||
v.forEach { v1 ->
|
||||
if (!v1.mustToken) {
|
||||
v1.id = id
|
||||
id++
|
||||
group.add(v1)
|
||||
}
|
||||
}
|
||||
if (group.size > 0) {
|
||||
listNew[k] = group
|
||||
}
|
||||
}
|
||||
return listNew
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,15 @@ package com.lizongying.mytv.api
|
||||
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import com.lizongying.mytv.jce.JceConverterFactory
|
||||
import okhttp3.ConnectionSpec
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.TlsVersion
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
import retrofit2.converter.protobuf.ProtoConverterFactory
|
||||
import java.net.InetSocketAddress
|
||||
import java.net.Proxy
|
||||
import javax.net.ssl.SSLContext
|
||||
import javax.net.ssl.TrustManager
|
||||
import javax.net.ssl.X509TrustManager
|
||||
@@ -19,6 +22,7 @@ class ApiClient {
|
||||
private val myUrl = "https://lyrics.run/"
|
||||
private val protoUrl = "https://capi.yangshipin.cn/"
|
||||
private val traceUrl = "https://btrace.yangshipin.cn/"
|
||||
private val jceUrl = "https://jacc.ysp.cctv.cn/"
|
||||
private val fUrl = "https://m.fengshows.com/"
|
||||
|
||||
private var okHttpClient = getUnsafeOkHttpClient()
|
||||
@@ -63,6 +67,14 @@ class ApiClient {
|
||||
.build().create(YSPBtraceService::class.java)
|
||||
}
|
||||
|
||||
val yspJceService: YSPJceService by lazy {
|
||||
Retrofit.Builder()
|
||||
.baseUrl(jceUrl)
|
||||
.client(okHttpClient)
|
||||
.addConverterFactory(JceConverterFactory.create())
|
||||
.build().create(YSPJceService::class.java)
|
||||
}
|
||||
|
||||
val fAuthService: FAuthService by lazy {
|
||||
Retrofit.Builder()
|
||||
.baseUrl(fUrl)
|
||||
@@ -126,9 +138,12 @@ class ApiClient {
|
||||
val sslContext = SSLContext.getInstance("SSL")
|
||||
sslContext.init(null, trustAllCerts, java.security.SecureRandom())
|
||||
|
||||
val proxy = Proxy(Proxy.Type.HTTP, InetSocketAddress("10.0.2.2", 8888))
|
||||
|
||||
val builder = OkHttpClient.Builder()
|
||||
.sslSocketFactory(sslContext.socketFactory, trustAllCerts[0] as X509TrustManager)
|
||||
.hostnameVerifier { _, _ -> true }
|
||||
// .proxy(proxy)
|
||||
.dns(DnsCache())
|
||||
|
||||
return enableTls12OnPreLollipop(builder).build()
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.lizongying.mytv.api
|
||||
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.TVTimeShiftProgramRequest
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.TVTimeShiftProgramResponse
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.Headers
|
||||
import retrofit2.http.POST
|
||||
|
||||
interface YSPJceService {
|
||||
@POST("/")
|
||||
@Headers(
|
||||
"content-type: application/octet-stream",
|
||||
"user-agent: CCTVVideo/2.9.0 (iPad; iOS 17.2; Scale/2.00)",
|
||||
)
|
||||
fun getProgram(
|
||||
@Body body: TVTimeShiftProgramRequest
|
||||
): Call<TVTimeShiftProgramResponse>
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.lizongying.mytv.jce;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
public class CompressUtils {
|
||||
private static final String TAG = "CompressUtils";
|
||||
|
||||
public static byte[] compressGZIP(byte[] bArr) {
|
||||
GZIPOutputStream gZIPOutputStream;
|
||||
Throwable th;
|
||||
if (bArr != null && bArr.length != 0) {
|
||||
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bArr);
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
try {
|
||||
gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);
|
||||
} catch (IOException unused) {
|
||||
gZIPOutputStream = null;
|
||||
} catch (Throwable th2) {
|
||||
gZIPOutputStream = null;
|
||||
th = th2;
|
||||
}
|
||||
try {
|
||||
byte[] bArr2 = new byte[4096];
|
||||
while (true) {
|
||||
int read = byteArrayInputStream.read(bArr2);
|
||||
if (read <= 0) {
|
||||
break;
|
||||
}
|
||||
gZIPOutputStream.write(bArr2, 0, read);
|
||||
}
|
||||
gZIPOutputStream.finish();
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
try {
|
||||
byteArrayInputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
gZIPOutputStream.close();
|
||||
} catch (IOException e2) {
|
||||
System.out.println(e2);
|
||||
}
|
||||
return byteArray;
|
||||
} catch (IOException unused2) {
|
||||
try {
|
||||
byteArrayInputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
if (gZIPOutputStream != null) {
|
||||
gZIPOutputStream.close();
|
||||
}
|
||||
} catch (IOException e3) {
|
||||
System.out.println(e3);
|
||||
}
|
||||
return null;
|
||||
} catch (Throwable th3) {
|
||||
th = th3;
|
||||
try {
|
||||
byteArrayInputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
if (gZIPOutputStream != null) {
|
||||
gZIPOutputStream.close();
|
||||
}
|
||||
} catch (IOException e4) {
|
||||
System.out.println(e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static byte[] decompressGZIP(byte[] bArr) {
|
||||
GZIPInputStream gZIPInputStream;
|
||||
Throwable th;
|
||||
if (bArr != null && bArr.length != 0) {
|
||||
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bArr);
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
try {
|
||||
gZIPInputStream = new GZIPInputStream(byteArrayInputStream);
|
||||
} catch (IOException unused) {
|
||||
gZIPInputStream = null;
|
||||
} catch (Throwable th2) {
|
||||
gZIPInputStream = null;
|
||||
th = th2;
|
||||
}
|
||||
|
||||
try {
|
||||
byte[] bArr2 = new byte[4096];
|
||||
while (true) {
|
||||
int read = gZIPInputStream.read(bArr2);
|
||||
if (read <= 0) {
|
||||
break;
|
||||
}
|
||||
byteArrayOutputStream.write(bArr2, 0, read);
|
||||
}
|
||||
byteArrayOutputStream.flush();
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
|
||||
try {
|
||||
byteArrayInputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
gZIPInputStream.close();
|
||||
} catch (IOException e2) {
|
||||
System.out.println(e2);
|
||||
}
|
||||
return byteArray;
|
||||
} catch (IOException unused2) {
|
||||
try {
|
||||
byteArrayInputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
if (gZIPInputStream != null) {
|
||||
gZIPInputStream.close();
|
||||
}
|
||||
} catch (IOException e3) {
|
||||
System.out.println(e3);
|
||||
}
|
||||
return null;
|
||||
} catch (Throwable th3) {
|
||||
th = th3;
|
||||
try {
|
||||
byteArrayInputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
if (gZIPInputStream != null) {
|
||||
gZIPInputStream.close();
|
||||
}
|
||||
} catch (IOException e4) {
|
||||
System.out.println(e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.lizongying.mytv.jce;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Converter;
|
||||
import retrofit2.Retrofit;
|
||||
|
||||
public class JceConverterFactory extends Converter.Factory {
|
||||
public static JceConverterFactory create() {
|
||||
return new JceConverterFactory();
|
||||
}
|
||||
|
||||
private JceConverterFactory() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Converter<ResponseBody, ?> responseBodyConverter(
|
||||
@NonNull Type type,
|
||||
@NonNull Annotation[] annotations,
|
||||
@NonNull Retrofit retrofit) {
|
||||
if (!(type instanceof Class<?>)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new JceResponseBodyConverter<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Converter<?, RequestBody> requestBodyConverter(
|
||||
@NonNull Type type,
|
||||
@NonNull Annotation[] parameterAnnotations,
|
||||
@NonNull Annotation[] methodAnnotations,
|
||||
@NonNull Retrofit retrofit) {
|
||||
if (!(type instanceof Class<?>)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new JceRequestBodyConverter<>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.lizongying.mytv.jce;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.qq.taf.jce.JceOutputStream;
|
||||
import com.qq.taf.jce.JceStruct;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.BusinessExtent;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.BusinessHead;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.QUA;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.RequestCommand;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.RequestHead;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Converter;
|
||||
|
||||
public class JceRequestBodyConverter<T extends JceStruct> implements Converter<T, RequestBody> {
|
||||
private static final MediaType MEDIA_TYPE = MediaType.get("application/octet-stream");
|
||||
|
||||
@Override
|
||||
public RequestBody convert(@NonNull T value) {
|
||||
BusinessHead businessHead = new BusinessHead();
|
||||
RequestHead requestHead = new RequestHead();
|
||||
requestHead.appId = "1200013";
|
||||
requestHead.busiExtent = new BusinessExtent(1);
|
||||
requestHead.cmdId = 24897;
|
||||
requestHead.contentType = 0;
|
||||
requestHead.guid = "093e7e5989684fd986c44f07542d8dc8";
|
||||
requestHead.isSupportDolby = 0;
|
||||
requestHead.oemPlatform = 0;
|
||||
QUA qua = new QUA();
|
||||
qua.appSubVersion = "";
|
||||
qua.areaMode = 1;
|
||||
qua.channelId = "50001";
|
||||
qua.clientKey = "A41CD6B6-6A56-46DC-9AE0-4ECF2E9118DF";
|
||||
qua.countryCode = 0;
|
||||
qua.densityDpi = 0;
|
||||
qua.deviceId = "5EE46760-11B1-5FE7-949A-FF232DAE1823";
|
||||
qua.deviceModel = "iPad Pro (12.9 inch) 3G";
|
||||
qua.deviceType = 1;
|
||||
qua.extent = "";
|
||||
qua.idfa = "";
|
||||
qua.imei = "";
|
||||
qua.langCode = 0;
|
||||
qua.mac = "";
|
||||
qua.markerId = 1;
|
||||
qua.mobileISP = 0;
|
||||
qua.networkMode = 0;
|
||||
qua.omgId = "78d6ac7572afb5461e9a590f089f893d2abc0010119007";
|
||||
qua.platform = 5;
|
||||
qua.platformVersion = "sysver=ios17.2&device=iPad&modify_time=&lang=zh_CN";
|
||||
qua.qimei = "1c0fc6ed8a53584ae722b915200014317601";
|
||||
qua.screenHeight = 2360;
|
||||
qua.screenWidth = 1640;
|
||||
qua.serverid = "";
|
||||
qua.v4ip = "";
|
||||
qua.versionCode = "23399";
|
||||
qua.versionName = "2.9.0.23399";
|
||||
requestHead.qua = qua;
|
||||
requestHead.requestId = 1;
|
||||
|
||||
JceOutputStream jceOutputStream = new JceOutputStream();
|
||||
jceOutputStream.setServerEncoding("utf-8");
|
||||
value.writeTo(jceOutputStream);
|
||||
byte[] bytes = jceOutputStream.toByteArray();
|
||||
RequestCommand requestCommand = new RequestCommand(requestHead, bytes, businessHead);
|
||||
bytes = b.b(requestCommand, requestHead.requestId);
|
||||
return RequestBody.create(MEDIA_TYPE, bytes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.lizongying.mytv.jce;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.qq.taf.jce.JceInputStream;
|
||||
import com.qq.taf.jce.JceStruct;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.QQVideoJCECmd;
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.ResponseCommand;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Converter;
|
||||
|
||||
public class JceResponseBodyConverter<T extends JceStruct> implements Converter<ResponseBody, T> {
|
||||
|
||||
JceResponseBodyConverter() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public T convert(@NonNull ResponseBody value) throws IOException {
|
||||
return parseFrom(value.bytes());
|
||||
}
|
||||
|
||||
public T parseFrom(byte[] aa) {
|
||||
byte[] bArr;
|
||||
|
||||
int[] iArr = new int[1];
|
||||
try {
|
||||
bArr = b.a(aa, iArr);
|
||||
} catch (Throwable unused) {
|
||||
bArr = null;
|
||||
}
|
||||
|
||||
ResponseCommand responseCommand = a.g(bArr, ResponseCommand.class);
|
||||
if (responseCommand == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
QQVideoJCECmd convert = QQVideoJCECmd.convert(responseCommand.head.cmdId);
|
||||
assert convert != null;
|
||||
|
||||
JceInputStream jceInputStream = new JceInputStream(responseCommand.body);
|
||||
jceInputStream.setServerEncoding("UTF-8");
|
||||
|
||||
JceStruct instance = null;
|
||||
try {
|
||||
instance = (JceStruct) Class.forName("com.tencent.videolite.android.datamodel.cctvjce." + convert + "Response").newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (instance != null) {
|
||||
instance.readFrom(jceInputStream);
|
||||
return (T) instance;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.lizongying.mytv.jce;
|
||||
|
||||
import com.qq.taf.jce.JceInputStream;
|
||||
import com.qq.taf.jce.JceOutputStream;
|
||||
import com.qq.taf.jce.JceStruct;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class a {
|
||||
|
||||
/* renamed from: a reason: collision with root package name */
|
||||
private static final String f33240a = "Net_Protocol";
|
||||
|
||||
private a() {
|
||||
}
|
||||
|
||||
private static JceStruct a(JceStruct jceStruct, ClassLoader classLoader) {
|
||||
Class<?> cls;
|
||||
if (jceStruct == null) {
|
||||
return null;
|
||||
}
|
||||
String name = jceStruct.getClass().getName();
|
||||
String str = name.substring(0, name.length() - 7) + "Response";
|
||||
try {
|
||||
if (classLoader == null) {
|
||||
cls = Class.forName(str);
|
||||
} else {
|
||||
cls = Class.forName(str, true, classLoader);
|
||||
}
|
||||
return (JceStruct) cls.newInstance();
|
||||
} catch (ClassNotFoundException unused) {
|
||||
return null;
|
||||
} catch (IllegalAccessException unused) {
|
||||
return null;
|
||||
} catch (InstantiationException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static JceStruct b(String str, ClassLoader classLoader) {
|
||||
Class<?> cls;
|
||||
if (str == null) {
|
||||
return null;
|
||||
}
|
||||
String str2 = str + "Response";
|
||||
try {
|
||||
if (classLoader == null) {
|
||||
cls = Class.forName(str2);
|
||||
} else {
|
||||
cls = Class.forName(str2, true, classLoader);
|
||||
}
|
||||
return (JceStruct) cls.newInstance();
|
||||
} catch (ClassNotFoundException unused) {
|
||||
return null;
|
||||
} catch (IllegalAccessException unused) {
|
||||
return null;
|
||||
} catch (InstantiationException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static int c(Object obj) {
|
||||
Field[] declaredFields;
|
||||
int i2 = 0;
|
||||
if (obj == null) {
|
||||
return 0;
|
||||
}
|
||||
for (Field field : obj.getClass().getDeclaredFields()) {
|
||||
if (field != null) {
|
||||
field.setAccessible(true);
|
||||
if (!field.getName().equals("errCode")) {
|
||||
continue;
|
||||
} else if (!field.getType().getName().equals(Integer.class.getName()) && !field.getType().getName().equals("int")) {
|
||||
if (field.getType().getName().equals(Long.class.getName()) || field.getType().getName().equals("long")) {
|
||||
try {
|
||||
return (int) field.getLong(obj);
|
||||
} catch (IllegalAccessException e2) {
|
||||
e2.printStackTrace();
|
||||
} catch (IllegalArgumentException e3) {
|
||||
e3.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return field.getInt(obj);
|
||||
} catch (IllegalAccessException e4) {
|
||||
e4.printStackTrace();
|
||||
} catch (IllegalArgumentException e5) {
|
||||
e5.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return i2;
|
||||
}
|
||||
|
||||
public static byte[] d(JceStruct jceStruct) {
|
||||
if (jceStruct == null) {
|
||||
return null;
|
||||
}
|
||||
JceOutputStream jceOutputStream = new JceOutputStream();
|
||||
jceOutputStream.setServerEncoding("utf-8");
|
||||
jceStruct.writeTo(jceOutputStream);
|
||||
return jceOutputStream.toByteArray();
|
||||
}
|
||||
|
||||
public static JceStruct e(JceStruct jceStruct, byte[] bArr, ClassLoader classLoader) {
|
||||
JceStruct a2;
|
||||
if (jceStruct != null && bArr != null && (a2 = a(jceStruct, classLoader)) != null) {
|
||||
try {
|
||||
JceInputStream jceInputStream = new JceInputStream(bArr);
|
||||
jceInputStream.setServerEncoding("utf-8");
|
||||
a2.readFrom(jceInputStream);
|
||||
return a2;
|
||||
} catch (Exception unused) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JceStruct f(String str, byte[] bArr, ClassLoader classLoader) {
|
||||
if (str != null && bArr != null) {
|
||||
JceStruct b2 = b(str, classLoader);
|
||||
if (b2 != null) {
|
||||
try {
|
||||
JceInputStream jceInputStream = new JceInputStream(bArr);
|
||||
jceInputStream.setServerEncoding("utf-8");
|
||||
b2.readFrom(jceInputStream);
|
||||
return b2;
|
||||
} catch (Exception e2) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends JceStruct> T g(byte[] bArr, Class<T> cls) {
|
||||
T t;
|
||||
if (bArr != null && bArr.length >= 4) {
|
||||
try {
|
||||
t = cls.newInstance();
|
||||
} catch (IllegalAccessException unused) {
|
||||
t = null;
|
||||
} catch (InstantiationException unused) {
|
||||
t = null;
|
||||
}
|
||||
try {
|
||||
JceInputStream jceInputStream = new JceInputStream(bArr);
|
||||
jceInputStream.setServerEncoding("utf-8");
|
||||
if (t != null) {
|
||||
t.readFrom(jceInputStream);
|
||||
}
|
||||
return t;
|
||||
} catch (Exception unused2) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
package com.lizongying.mytv.jce;
|
||||
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.RequestCommand;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class b {
|
||||
|
||||
/* renamed from: a reason: collision with root package name */
|
||||
private static final String f33241a = "Net_UnifiedProtocol";
|
||||
|
||||
b() {
|
||||
}
|
||||
|
||||
public static byte[] a(byte[] bArr, int[] iArr) {
|
||||
boolean z;
|
||||
if (bArr == null || bArr.length == 0) {
|
||||
return null;
|
||||
}
|
||||
ByteBuffer wrap = ByteBuffer.wrap(bArr);
|
||||
if (wrap.get() == 19 && wrap.getInt() == bArr.length) {
|
||||
wrap.getShort();
|
||||
if ((wrap.getShort() & 65535) != 65281) {
|
||||
|
||||
return null;
|
||||
}
|
||||
wrap.getShort();
|
||||
int i2 = wrap.getShort() & 65535;
|
||||
if (i2 != 0) {
|
||||
iArr[0] = i2;
|
||||
|
||||
return null;
|
||||
}
|
||||
wrap.getLong();
|
||||
int i3 = wrap.getInt();
|
||||
if ((i3 & 2) <= 0) {
|
||||
z = false;
|
||||
} else if ((i3 & 16) <= 0) {
|
||||
iArr[0] = -867;
|
||||
return null;
|
||||
} else {
|
||||
z = true;
|
||||
}
|
||||
wrap.getInt();
|
||||
wrap.getLong();
|
||||
wrap.position(wrap.position() + 32);
|
||||
wrap.get();
|
||||
wrap.position(wrap.position() + 10);
|
||||
wrap.get();
|
||||
wrap.position(wrap.position() + (wrap.getShort() & 65535));
|
||||
int i4 = 65535 & wrap.getShort();
|
||||
wrap.position(wrap.position() + i4);
|
||||
int i5 = 83 + i4 + 2;
|
||||
int i6 = wrap.getInt();
|
||||
int i7 = i5 + 4;
|
||||
if (wrap.get(bArr.length - 1) != 3) {
|
||||
iArr[0] = -869;
|
||||
return null;
|
||||
}
|
||||
int length = (bArr.length - i7) - 1;
|
||||
if (length <= 0) {
|
||||
iArr[0] = -868;
|
||||
return null;
|
||||
}
|
||||
byte[] bArr2 = new byte[length];
|
||||
System.arraycopy(bArr, i7, bArr2, 0, length);
|
||||
return c(bArr2, z, i6, iArr);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static byte[] b(RequestCommand requestCommand, long j) {
|
||||
byte[] d2 = a.d(requestCommand);
|
||||
if (d2 == null) {
|
||||
return null;
|
||||
}
|
||||
byte[] d3 = d(d2);
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(d3.length + 50);
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
|
||||
try {
|
||||
dataOutputStream.writeByte(19);
|
||||
dataOutputStream.writeInt(0);
|
||||
dataOutputStream.writeShort(2);
|
||||
dataOutputStream.writeShort(65281);
|
||||
dataOutputStream.writeShort(requestCommand.head.cmdId);
|
||||
dataOutputStream.writeShort(0);
|
||||
dataOutputStream.writeLong(j);
|
||||
dataOutputStream.writeInt(531);
|
||||
dataOutputStream.writeInt(0);
|
||||
dataOutputStream.writeLong(0);
|
||||
e(dataOutputStream, requestCommand.head.guid, 32);
|
||||
dataOutputStream.writeByte(0);
|
||||
// VersionCode
|
||||
dataOutputStream.writeInt(0);
|
||||
e(dataOutputStream, null, 6);
|
||||
dataOutputStream.writeByte(0);
|
||||
dataOutputStream.writeShort(0);
|
||||
dataOutputStream.writeShort(0);
|
||||
dataOutputStream.writeInt(d3.length);
|
||||
byte[] compressGZIP = CompressUtils.compressGZIP(d3);
|
||||
if (compressGZIP == null) {
|
||||
return null;
|
||||
}
|
||||
dataOutputStream.write(compressGZIP);
|
||||
dataOutputStream.writeByte(3);
|
||||
dataOutputStream.close();
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
ByteBuffer wrap = ByteBuffer.wrap(byteArray);
|
||||
wrap.putInt(1, byteArray.length);
|
||||
return wrap.array();
|
||||
} catch (IOException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] c(byte[] bArr, boolean z, int i2, int[] iArr) {
|
||||
if (bArr == null) {
|
||||
iArr[0] = -871;
|
||||
return null;
|
||||
// } else if (z && ((bArr = CompressUtils.decompressGZIP(bArr)) == null || bArr.length != i2)) {
|
||||
} else if (z && ((bArr = CompressUtils.decompressGZIP(bArr)) == null)) {
|
||||
iArr[0] = -871;
|
||||
|
||||
return null;
|
||||
} else {
|
||||
ByteBuffer wrap = ByteBuffer.wrap(bArr);
|
||||
int position = wrap.position() + 16;
|
||||
if (wrap.get() != 38) {
|
||||
iArr[0] = -869;
|
||||
return null;
|
||||
} else if (wrap.get(bArr.length - 1) != 40) {
|
||||
iArr[0] = -869;
|
||||
return null;
|
||||
} else {
|
||||
int length = (bArr.length - position) - 1;
|
||||
if (length <= 0) {
|
||||
iArr[0] = -869;
|
||||
return null;
|
||||
}
|
||||
byte[] bArr2 = new byte[length];
|
||||
System.arraycopy(bArr, position, bArr2, 0, length);
|
||||
return bArr2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] d(byte[] bArr) {
|
||||
int length = bArr.length + 17;
|
||||
ByteBuffer allocate = ByteBuffer.allocate(length);
|
||||
allocate.put((byte) 38);
|
||||
allocate.putInt(length);
|
||||
allocate.put((byte) 1);
|
||||
allocate.position(allocate.position() + 10);
|
||||
allocate.put(bArr);
|
||||
allocate.put((byte) 40);
|
||||
return allocate.array();
|
||||
}
|
||||
|
||||
private static void e(OutputStream outputStream, String str, int i2) throws IOException {
|
||||
byte[] bArr;
|
||||
int i3;
|
||||
if (i2 > 0) {
|
||||
if (str != null) {
|
||||
bArr = str.getBytes("UTF-8");
|
||||
i3 = bArr.length;
|
||||
} else {
|
||||
bArr = null;
|
||||
i3 = 0;
|
||||
}
|
||||
if (i3 >= i2) {
|
||||
outputStream.write(bArr, 0, i2);
|
||||
return;
|
||||
}
|
||||
if (i3 > 0) {
|
||||
outputStream.write(bArr, 0, i3);
|
||||
}
|
||||
while (i3 < i2) {
|
||||
outputStream.write(0);
|
||||
i3++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.lizongying.mytv.models
|
||||
|
||||
enum class ProgramType {
|
||||
Y_PROTO,
|
||||
Y_JCE,
|
||||
F,
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import androidx.lifecycle.ViewModel
|
||||
import com.lizongying.mytv.TV
|
||||
import com.lizongying.mytv.api.FEPG
|
||||
import com.lizongying.mytv.proto.Ysp.cn.yangshipin.omstv.common.proto.programModel.Program
|
||||
import com.tencent.videolite.android.datamodel.cctvjce.TVProgram
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.TimeZone
|
||||
|
||||
@@ -114,6 +115,10 @@ class TVViewModel(private var tv: TV) : ViewModel() {
|
||||
return tv
|
||||
}
|
||||
|
||||
fun addYJceEPG(p: MutableList<TVProgram>) {
|
||||
_epg.value = p.map { EPG(it.name, it.start_time_stamp.toInt()) }.toMutableList()
|
||||
}
|
||||
|
||||
fun addYEPG(p: MutableList<Program>) {
|
||||
_epg.value = p.map { EPG(it.name, it.st.toInt()) }.toMutableList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user