mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-27 13:56:29 +08:00
Add:添加log信息
This commit is contained in:
@@ -6,6 +6,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import kotlin.math.log
|
||||||
|
|
||||||
object TVList {
|
object TVList {
|
||||||
@Volatile
|
@Volatile
|
||||||
@@ -45,7 +46,7 @@ object TVList {
|
|||||||
val url = ChannelUtils.getServerUrl(context)
|
val url = ChannelUtils.getServerUrl(context)
|
||||||
//是否从服务器更新
|
//是否从服务器更新
|
||||||
updateFromServer = true
|
updateFromServer = true
|
||||||
|
Log.i("TVList", "从服务器获取频道信息")
|
||||||
try {
|
try {
|
||||||
ChannelUtils.getServerChannel(url)
|
ChannelUtils.getServerChannel(url)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
@@ -54,6 +55,7 @@ object TVList {
|
|||||||
ChannelUtils.getLocalChannel(context)
|
ChannelUtils.getLocalChannel(context)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Log.i("TVList", "从本地获取频道信息")
|
||||||
//获取本地频道
|
//获取本地频道
|
||||||
ChannelUtils.getLocalChannel(context)
|
ChannelUtils.getLocalChannel(context)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user