mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-27 06:36:29 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eac355a1c1 | ||
|
|
6c6736fd0a | ||
|
|
f4c1db33b3 | ||
|
|
e55584c910 |
@@ -1,5 +1,13 @@
|
||||
## 更新日誌
|
||||
|
||||
### v2.1.4
|
||||
|
||||
* 解決切換頻道時黑屏問題
|
||||
|
||||
### v2.1.1
|
||||
|
||||
* 平衡聲音
|
||||
|
||||
### v2.1.0
|
||||
|
||||
* 恢復播放
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
/CMakeFiles/
|
||||
/Makefile
|
||||
/src/main/cpp/native.c
|
||||
/src/main/cpp/aes.c
|
||||
|
||||
+3
-1
@@ -21,7 +21,9 @@ if (IS_SO_BUILD)
|
||||
SHARED
|
||||
|
||||
# Provides a relative path to your source file(s).
|
||||
src/main/cpp/native.c)
|
||||
src/main/cpp/native.c
|
||||
src/main/cpp/aes.c
|
||||
)
|
||||
|
||||
# 设置编译输出路径
|
||||
set_target_properties(
|
||||
|
||||
+21
-48
@@ -99,52 +99,25 @@ static def VersionName() {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
// minSdk17
|
||||
def media3_version = "1.2.1"
|
||||
|
||||
implementation "androidx.media3:media3-ui:$media3_version"
|
||||
|
||||
// For media playback using ExoPlayer
|
||||
implementation ("com.google.guava:guava:31.1-android")
|
||||
implementation ("androidx.media3:media3-common:$media3_version") {
|
||||
exclude group: 'com.google.common', module: 'guava'
|
||||
}
|
||||
implementation ("androidx.media3:media3-exoplayer:$media3_version")
|
||||
|
||||
// For HLS playback support with ExoPlayer
|
||||
implementation "androidx.media3:media3-exoplayer-hls:$media3_version"
|
||||
|
||||
// 21:2.9.0 17:2.6.4
|
||||
def retrofit2_version = "2.6.4"
|
||||
|
||||
implementation 'com.google.protobuf:protobuf-kotlin:3.25.1'
|
||||
// Gson 2.10.1 and older: API level 19
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
implementation("com.squareup.retrofit2:converter-gson:$retrofit2_version") {
|
||||
exclude group: 'com.google.code.gson', module: 'gson'
|
||||
}
|
||||
implementation "com.squareup.retrofit2:converter-protobuf:$retrofit2_version"
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit2_version"
|
||||
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
|
||||
implementation("androidx.work:work-runtime-ktx:2.9.0")
|
||||
implementation 'androidx.core:core-ktx:1.11.0-beta02'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.leanback:leanback:1.2.0-alpha02'
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2"
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0-RC")
|
||||
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
}
|
||||
|
||||
configurations.configureEach {
|
||||
resolutionStrategy {
|
||||
force 'com.google.code.gson:gson:2.10.1'
|
||||
force 'com.google.guava:guava:31.1-android'
|
||||
}
|
||||
implementation(libs.media3.ui)
|
||||
implementation(libs.failureaccess)
|
||||
implementation(libs.guava)
|
||||
implementation(libs.media3.common)
|
||||
implementation(libs.media3.exoplayer)
|
||||
implementation(libs.media3.exoplayer.hls)
|
||||
implementation(libs.protobuf.kotlin)
|
||||
implementation(libs.gson)
|
||||
implementation(libs.converter.gson)
|
||||
implementation(libs.converter.protobuf)
|
||||
implementation(libs.retrofit)
|
||||
implementation(libs.glide)
|
||||
implementation(libs.work.runtime.ktx)
|
||||
implementation(libs.core.ktx)
|
||||
implementation(libs.multidex)
|
||||
implementation(libs.leanback)
|
||||
implementation(libs.lifecycle.runtime.ktx)
|
||||
implementation(libs.constraintlayout)
|
||||
implementation(libs.serialization.json)
|
||||
implementation(libs.coroutines.android)
|
||||
implementation(libs.javax.annotation.api)
|
||||
}
|
||||
Vendored
+7
-1
@@ -18,4 +18,10 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-keep class com.google.gson.** { *; }
|
||||
-dontwarn com.google.gson.**
|
||||
|
||||
-keep class com.google.guava.** { *; }
|
||||
-dontwarn com.google.guava.**
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
#ifndef AES_H
|
||||
#define AES_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void init();
|
||||
void encode(const char *in, size_t size, char *out);
|
||||
|
||||
#endif
|
||||
@@ -3,13 +3,37 @@ package com.lizongying.mytv
|
||||
import android.app.AlertDialog
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.lizongying.mytv.databinding.ConfirmationBinding
|
||||
|
||||
class ConfirmationFragment(
|
||||
private val listener: ConfirmationListener,
|
||||
private val message: String,
|
||||
private val update: Boolean
|
||||
) : DialogFragment() {
|
||||
//
|
||||
// private var _binding: ConfirmationBinding? = null
|
||||
// private val binding get() = _binding!!
|
||||
//
|
||||
// override fun onCreateView(
|
||||
// inflater: LayoutInflater, container: ViewGroup?,
|
||||
// savedInstanceState: Bundle?
|
||||
// ): View {
|
||||
// _binding = ConfirmationBinding.inflate(inflater, container, false)
|
||||
// return binding.root
|
||||
// }
|
||||
//
|
||||
// fun updateProgress(progress: Int) {
|
||||
// binding.progressBar.progress = progress
|
||||
// }
|
||||
//
|
||||
// override fun onDestroyView() {
|
||||
// super.onDestroyView()
|
||||
// _binding = null
|
||||
// }
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return activity?.let {
|
||||
|
||||
@@ -5,7 +5,10 @@ import android.content.Context
|
||||
import android.content.res.Resources
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.WindowManager
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.ViewModelStore
|
||||
import androidx.multidex.MultiDex
|
||||
import com.lizongying.mytv.models.MyViewModel
|
||||
|
||||
|
||||
class MyTVApplication : Application() {
|
||||
@@ -23,6 +26,8 @@ class MyTVApplication : Application() {
|
||||
private var density = 2.0f
|
||||
private var scale = 1.0f
|
||||
|
||||
lateinit var myViewModel: MyViewModel
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
@@ -60,6 +65,11 @@ class MyTVApplication : Application() {
|
||||
|
||||
deviation = width - Resources.getSystem().displayMetrics.widthPixels
|
||||
scale = Resources.getSystem().displayMetrics.scaledDensity
|
||||
|
||||
myViewModel = ViewModelProvider(
|
||||
ViewModelStore(),
|
||||
ViewModelProvider.NewInstanceFactory()
|
||||
)[MyViewModel::class.java]
|
||||
}
|
||||
|
||||
fun getDisplayMetrics(): DisplayMetrics {
|
||||
|
||||
@@ -93,6 +93,7 @@ class PlayerFragment : Fragment() {
|
||||
playerView?.player?.run {
|
||||
setMediaItem(MediaItem.fromUri(tvViewModel.getVideoUrlCurrent()))
|
||||
prepare()
|
||||
volume = tvViewModel.getTV().volume
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,14 @@ import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.widget.Toast
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.marginEnd
|
||||
import androidx.core.view.marginTop
|
||||
import androidx.fragment.app.DialogFragment
|
||||
@@ -159,6 +162,21 @@ class SettingFragment : DialogFragment() {
|
||||
requireActivity().finishAffinity()
|
||||
}
|
||||
|
||||
// val myViewModel = application.myViewModel
|
||||
// application.myViewModel.downloadProgress.observe(viewLifecycleOwner) { _ ->
|
||||
// val downloadProgress = myViewModel.downloadProgress.value
|
||||
// if (downloadProgress != null) {
|
||||
// if (downloadProgress == 100) {
|
||||
// binding.progressBar.visibility = GONE
|
||||
// } else {
|
||||
// if (!binding.progressBar.isVisible) {
|
||||
// binding.progressBar.visibility = VISIBLE
|
||||
// }
|
||||
// binding.progressBar.progress = downloadProgress
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
updateManager = UpdateManager(context, context.appVersionCode)
|
||||
|
||||
return binding.root
|
||||
|
||||
@@ -31,7 +31,7 @@ class UpdateManager(
|
||||
release = releaseRequest.getRelease()
|
||||
val code = release?.version_code
|
||||
if (code != null) {
|
||||
if (code.toLong() > versionCode) {
|
||||
if (code.toLong() >= versionCode) {
|
||||
text = "最新版本:${release?.version_name}"
|
||||
update = true
|
||||
} else {
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.work.CoroutineWorker
|
||||
import androidx.work.WorkerParameters
|
||||
import com.lizongying.mytv.models.MyViewModel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.File
|
||||
@@ -22,6 +23,8 @@ class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker
|
||||
private lateinit var notificationManager: NotificationManager
|
||||
private lateinit var notificationBuilder: NotificationCompat.Builder
|
||||
|
||||
private lateinit var myViewModel: MyViewModel
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
val downloadUrl = inputData.getString("DOWNLOAD_URL") ?: return Result.failure()
|
||||
val apkFileName = inputData.getString("APK_FILENAME") ?: return Result.failure()
|
||||
@@ -29,6 +32,9 @@ class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker
|
||||
|
||||
showNotification(applicationContext)
|
||||
|
||||
val app = applicationContext as MyTVApplication
|
||||
myViewModel = app.myViewModel
|
||||
|
||||
return withContext(Dispatchers.IO) {
|
||||
try {
|
||||
downloadAndInstall(applicationContext, downloadUrl, apkFileName, versionName)
|
||||
@@ -96,6 +102,8 @@ class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker
|
||||
|
||||
if (bytesTotal > 0) {
|
||||
val progress = (bytesDownloaded * 100L / bytesTotal).toInt()
|
||||
Log.i(TAG, "progress $progress")
|
||||
// myViewModel.setDownloadProgress(progress)
|
||||
notificationBuilder.setProgress(100, progress, false)
|
||||
notificationManager.notify(1, notificationBuilder.build())
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ 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
|
||||
@@ -166,7 +168,7 @@ 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 proxy = Proxy(Proxy.Type.HTTP, InetSocketAddress("10.0.2.2", 8888))
|
||||
|
||||
val builder = OkHttpClient.Builder()
|
||||
.sslSocketFactory(sslContext.socketFactory, trustAllCerts[0] as X509TrustManager)
|
||||
|
||||
@@ -7,6 +7,8 @@ class Encryptor {
|
||||
|
||||
external fun encrypt(t: String, e: String, r: String, n: String, i: String): String
|
||||
|
||||
external fun encrypt2(t: String): String
|
||||
|
||||
external fun hash(data: ByteArray): ByteArray?
|
||||
|
||||
external fun hash2(data: ByteArray): ByteArray?
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.lizongying.mytv.api
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.lizongying.mytv.SP
|
||||
import com.lizongying.mytv.Utils.getDateTimestamp
|
||||
import com.lizongying.mytv.models.TVViewModel
|
||||
@@ -57,6 +58,7 @@ object YSP {
|
||||
|
||||
var yspsdkinput = ""
|
||||
var openapi_signature = ""
|
||||
var yspticket = ""
|
||||
|
||||
var nseqId = 1
|
||||
var nrequest_id = ""
|
||||
@@ -85,6 +87,8 @@ object YSP {
|
||||
encryptor.encrypt(cnlid, timeStr, appVer, guid, platform)
|
||||
randStr = getRand()
|
||||
signature = getSignature()
|
||||
yspticket = encryptor.encrypt2("$livepid&$timeStr&$guid&519748109").lowercase()
|
||||
|
||||
return """{"cnlid":"$cnlid","livepid":"$livepid","stream":"$stream","guid":"$guid","cKey":"$cKey","adjust":$adjust,"sphttps":"$sphttps","platform":"$platform","cmd":"$cmd","encryptVer":"$encryptVer","dtype":"$dtype","devid":"$devid","otype":"$otype","appVer":"$appVer","app_version":"$appVersion","rand_str":"$randStr","channel":"$channel","defn":"$defn","signature":"$signature"}"""
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ interface YSPApiService {
|
||||
@Header("Yspplayertoken") token: String,
|
||||
@Header("Yspsdkinput") Yspsdkinput: String,
|
||||
@Header("yspsdksign") yspsdksign: String,
|
||||
@Header("Yspticket") Yspticket: String,
|
||||
@Header("Seqid") Seqid: String,
|
||||
@Header("Request-Id") RequestId: String,
|
||||
@Header("Yspappid") Yspappid: String="519748109",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.lizongying.mytv.models
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
class MyViewModel : ViewModel() {
|
||||
private var _downloadProgress = MutableLiveData<Int>()
|
||||
val downloadProgress: LiveData<Int>
|
||||
get() = _downloadProgress
|
||||
|
||||
fun setDownloadProgress(progress: Int) {
|
||||
_downloadProgress.value = progress
|
||||
}
|
||||
|
||||
init {
|
||||
_downloadProgress.value = 0
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ data class TV(
|
||||
var programType: ProgramType,
|
||||
var needToken: Boolean = false,
|
||||
var mustToken: Boolean = false,
|
||||
var volume: Float = 0.1F,
|
||||
) : Serializable {
|
||||
|
||||
override fun toString(): String {
|
||||
|
||||
@@ -21,7 +21,8 @@ object TVList {
|
||||
"2022576801",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -34,7 +35,8 @@ object TVList {
|
||||
"2022576701",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -47,7 +49,8 @@ object TVList {
|
||||
"2022576501",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
mustToken = true,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -60,7 +63,8 @@ object TVList {
|
||||
"2022576601",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -73,7 +77,8 @@ object TVList {
|
||||
"2022576401",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -86,7 +91,8 @@ object TVList {
|
||||
"2013693901",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
mustToken = true,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -99,7 +105,8 @@ object TVList {
|
||||
"2022576201",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -112,7 +119,8 @@ object TVList {
|
||||
"2022576101",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = true
|
||||
mustToken = true,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -125,7 +133,8 @@ object TVList {
|
||||
"2022576001",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -138,7 +147,8 @@ object TVList {
|
||||
"2022573001",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -151,7 +161,8 @@ object TVList {
|
||||
"2022575901",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -164,7 +175,8 @@ object TVList {
|
||||
"2022575801",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -177,7 +189,8 @@ object TVList {
|
||||
"2022575701",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -190,7 +203,8 @@ object TVList {
|
||||
"2022575601",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -203,7 +217,8 @@ object TVList {
|
||||
"2022575501",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -216,7 +231,8 @@ object TVList {
|
||||
"2022575401",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -229,7 +245,8 @@ object TVList {
|
||||
"2022575301",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -242,7 +259,8 @@ object TVList {
|
||||
"2022576301",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -255,7 +273,8 @@ object TVList {
|
||||
"2022575201",
|
||||
ProgramType.Y_PROTO,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -268,7 +287,8 @@ object TVList {
|
||||
"2020603421",
|
||||
ProgramType.Y_JCE,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.8F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -738,7 +758,8 @@ object TVList {
|
||||
"2019927403",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -751,7 +772,8 @@ object TVList {
|
||||
"2022606701",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.8F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -764,7 +786,8 @@ object TVList {
|
||||
"2022823801",
|
||||
ProgramType.Y_JCE,
|
||||
true,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.6F
|
||||
),
|
||||
),
|
||||
"港澳台" to listOf(
|
||||
@@ -779,7 +802,8 @@ object TVList {
|
||||
"",
|
||||
ProgramType.F,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.7F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -792,7 +816,8 @@ object TVList {
|
||||
"",
|
||||
ProgramType.F,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.7F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -805,7 +830,8 @@ object TVList {
|
||||
"",
|
||||
ProgramType.F,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.7F
|
||||
),
|
||||
),
|
||||
"国际" to listOf(
|
||||
@@ -820,7 +846,8 @@ object TVList {
|
||||
"2022575001",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -833,7 +860,8 @@ object TVList {
|
||||
"2022574901",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -846,7 +874,8 @@ object TVList {
|
||||
"2022574801",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -859,7 +888,8 @@ object TVList {
|
||||
"2022574601",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -872,7 +902,8 @@ object TVList {
|
||||
"2022571701",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
TV(
|
||||
0,
|
||||
@@ -885,7 +916,8 @@ object TVList {
|
||||
"2022574701",
|
||||
ProgramType.Y_PROTO,
|
||||
false,
|
||||
mustToken = false
|
||||
mustToken = false,
|
||||
0.5F
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -316,10 +316,11 @@ object Request {
|
||||
val request = LiveInfoRequest(data)
|
||||
call = request.let {
|
||||
yspApiService.getLiveInfo(
|
||||
"guid=${YSP.getGuid()}; gr_user_id=261eecf2-0ce4-4316-a6a1-7171e3de7389; $cookie; newLogin=1; nseqId=${YSP.nseqId}; nrequest-id=${YSP.nrequest_id}",
|
||||
"guid=${YSP.getGuid()}; gr_user_id=1; $cookie; newLogin=1; nseqId=${YSP.nseqId}; nrequest-id=${YSP.nrequest_id}",
|
||||
YSP.token,
|
||||
YSP.yspsdkinput,
|
||||
YSP.openapi_signature,
|
||||
YSP.yspticket,
|
||||
"${YSP.nseqId}",
|
||||
YSP.nrequest_id,
|
||||
"519748109",
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<!-- res/layout/fragment_progress_dialog.xml -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/start_update"
|
||||
tools:text="开始更新">
|
||||
</Button>
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="false"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@android:drawable/progress_horizontal" />
|
||||
</LinearLayout>
|
||||
@@ -11,6 +11,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
app:shutter_background_color="@android:color/transparent"
|
||||
app:resize_mode="fill"
|
||||
app:use_controller="false" />
|
||||
</FrameLayout>
|
||||
@@ -59,6 +59,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<!-- <androidx.core.widget.ContentLoadingProgressBar-->
|
||||
<!-- android:id="@+id/progressBar"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:indeterminate="false"-->
|
||||
<!-- android:max="100"-->
|
||||
<!-- android:progress="0"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- android:progressDrawable="@android:drawable/progress_horizontal" />-->
|
||||
<Button
|
||||
android:id="@+id/clear"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
<string name="title_time">显示时间</string>
|
||||
<string name="clear">恢复默认</string>
|
||||
<string name="exit">退出应用</string>
|
||||
<string name="start_update">开始更新</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,40 @@
|
||||
[versions]
|
||||
media3 = "1.2.1" # minSdk17
|
||||
gson = "2.10.1" # 2.10.1 and older: API level 19
|
||||
failureaccess = "1.0.2"
|
||||
guava = "33.2.1-android"
|
||||
retrofit = "2.6.4" # 21:2.9.0 17:2.6.4
|
||||
protobuf = "3.25.1"
|
||||
glide = "4.11.0"
|
||||
work = "2.9.0"
|
||||
core_ktx = "1.11.0-beta02"
|
||||
multidex = "2.0.1"
|
||||
leanback = "1.2.0-alpha02"
|
||||
lifecycle = "2.6.2"
|
||||
constraintlayout = "2.1.4"
|
||||
serialization = "1.6.2"
|
||||
coroutines = "1.8.0-RC"
|
||||
javax_annotation = "1.3.2"
|
||||
|
||||
[libraries]
|
||||
media3-ui = { module = "androidx.media3:media3-ui", version.ref = "media3" }
|
||||
media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" }
|
||||
media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
|
||||
media3-exoplayer-hls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "media3" }
|
||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||
failureaccess = { module = "com.google.guava:failureaccess", version.ref = "failureaccess" }
|
||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
|
||||
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
|
||||
converter-protobuf = { module = "com.squareup.retrofit2:converter-protobuf", version.ref = "retrofit" }
|
||||
protobuf-kotlin = { module = "com.google.protobuf:protobuf-kotlin", version.ref = "protobuf" }
|
||||
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
|
||||
work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "work" }
|
||||
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core_ktx" }
|
||||
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
|
||||
leanback = { module = "androidx.leanback:leanback", version.ref = "leanback" }
|
||||
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
|
||||
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
|
||||
serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
|
||||
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
|
||||
javax-annotation-api = { module = "javax.annotation:javax.annotation-api", version.ref = "javax_annotation" }
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version_code": 33619968, "version_name": "v2.1.0"}
|
||||
{"version_code": 33620992, "version_name": "v2.1.4"}
|
||||
|
||||
Reference in New Issue
Block a user