mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-16 08:26:38 +08:00
fix bug
This commit is contained in:
@@ -71,12 +71,15 @@ class TVViewModel(private var tv: TV) : ViewModel() {
|
||||
val backgroundImage: LiveData<String>
|
||||
get() = _backgroundImage
|
||||
|
||||
// 方法用于更新背景图信息
|
||||
fun getBackgroundImage(): String {
|
||||
return tv.logo ?: ""
|
||||
}
|
||||
|
||||
fun updateBackgroundImage(url: String) {
|
||||
_backgroundImage.value = url
|
||||
}
|
||||
|
||||
fun updateVideoUrl(url: String) {
|
||||
private fun updateVideoUrl(url: String) {
|
||||
tv.videoUrl = listOf(url)
|
||||
tv.videoIndex = 0
|
||||
_videoUrl.value = listOf(url)
|
||||
@@ -106,10 +109,9 @@ class TVViewModel(private var tv: TV) : ViewModel() {
|
||||
}
|
||||
|
||||
fun ysp(): String? {
|
||||
if (tv.pid == "") {
|
||||
return null
|
||||
}
|
||||
return mapping[tv.title]
|
||||
}
|
||||
|
||||
fun getBackgroundImage(): String {
|
||||
return tv.logo ?: ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user