Skip to content

Commit

Permalink
some channel epg
Browse files Browse the repository at this point in the history
  • Loading branch information
lizongying committed Apr 3, 2024
1 parent a3a9bdc commit 74b6287
Show file tree
Hide file tree
Showing 45 changed files with 4,132 additions and 304 deletions.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
## 更新日志

### v1.7.6(通用)

* 临时去掉部分频道,提高频道的可用性
* 部分频道增加节目单

### v1.7.4(通用)

* 修复368

### v1.7.3(安卓5及以上专用)

* 临时去掉部分频道,提高频道的可用性
* 部分频道增加节目单
* 遥控器左键进入节目列表
* 遥控器右键进入菜单

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ adb install my-tv.apk
* CHC高清三个电影频道
* 地方频道
* 收藏夹
* 自定义源
* 海外
* 节目增加预告
* 频道列表优化
* 自动更新
* 显示时间
* 软解
* 不同分辨率

## 赞赏

Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/com/lizongying/mytv/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class MainActivity : FragmentActivity(), Request.RequestListener {

setContentView(R.layout.activity_main)

Request.onCreate()
Request.setRequestListener(this)

window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
Expand Down Expand Up @@ -202,7 +201,7 @@ class MainActivity : FragmentActivity(), Request.RequestListener {
fun fragmentReady() {
ready++
Log.i(TAG, "ready $ready")
if (ready == 6) {
if (ready == 5) {
mainFragment.fragmentReady()
}
}
Expand Down
17 changes: 13 additions & 4 deletions app/src/main/java/com/lizongying/mytv/MainFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.leanback.widget.Row
import androidx.leanback.widget.RowPresenter
import androidx.lifecycle.lifecycleScope
import com.lizongying.mytv.api.YSP
import com.lizongying.mytv.models.ProgramType
import com.lizongying.mytv.models.TVListViewModel
import com.lizongying.mytv.models.TVViewModel
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -298,10 +299,18 @@ class MainFragment : BrowseSupportFragment() {
}

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)
}
}
}

Expand Down

0 comments on commit 74b6287

Please sign in to comment.