diff --git a/app/src/leanback/java/com/fongmi/android/tv/ui/activity/LiveActivity.java b/app/src/leanback/java/com/fongmi/android/tv/ui/activity/LiveActivity.java index 9ebde881b..8f76fb758 100644 --- a/app/src/leanback/java/com/fongmi/android/tv/ui/activity/LiveActivity.java +++ b/app/src/leanback/java/com/fongmi/android/tv/ui/activity/LiveActivity.java @@ -558,6 +558,7 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick @Override public void onKeyUp() { + if (mGroup == null || mChannel == null) return; int position = mGroup.getPosition() - 1; boolean limit = position < 0; if (Prefers.isAcross() & limit) prevGroup(true); @@ -567,6 +568,7 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick @Override public void onKeyDown() { + if (mGroup == null || mChannel == null) return; int position = mGroup.getPosition() + 1; boolean limit = position > mChannelAdapter.size() - 1; if (Prefers.isAcross() && limit) nextGroup(true); @@ -576,6 +578,7 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick @Override public void onKeyLeft(int time) { + if (mGroup == null || mChannel == null) return; if (isVisible(mBinding.widget.center)) App.post(mR2, 500); if (mChannel.isOnly() && mPlayers.isVod()) mPlayers.seekTo(time); else if (!mChannel.isOnly()) prevLine(); @@ -584,6 +587,7 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick @Override public void onKeyRight(int time) { + if (mGroup == null || mChannel == null) return; if (isVisible(mBinding.widget.center)) App.post(mR2, 500); if (mChannel.isOnly() && mPlayers.isVod()) mPlayers.seekTo(time); else if (!mChannel.isOnly()) nextLine(true); diff --git a/app/src/leanback/java/com/fongmi/android/tv/ui/custom/CustomKeyDownLive.java b/app/src/leanback/java/com/fongmi/android/tv/ui/custom/CustomKeyDownLive.java index bc465972d..07ebcb952 100644 --- a/app/src/leanback/java/com/fongmi/android/tv/ui/custom/CustomKeyDownLive.java +++ b/app/src/leanback/java/com/fongmi/android/tv/ui/custom/CustomKeyDownLive.java @@ -56,11 +56,9 @@ public class CustomKeyDownLive extends GestureDetector.SimpleOnGestureListener { } else if (event.getAction() == KeyEvent.ACTION_DOWN && Utils.isRightKey(event)) { listener.onSeeking(addTime()); } else if (event.getAction() == KeyEvent.ACTION_DOWN && Utils.isUpKey(event)) { - if (Prefers.isInvert()) listener.onKeyDown(); - else listener.onKeyUp(); + if (Prefers.isInvert()) listener.onKeyDown(); else listener.onKeyUp(); } else if (event.getAction() == KeyEvent.ACTION_DOWN && Utils.isDownKey(event)) { - if (Prefers.isInvert()) listener.onKeyUp(); - else listener.onKeyDown(); + if (Prefers.isInvert()) listener.onKeyUp(); else listener.onKeyDown(); } else if (event.getAction() == KeyEvent.ACTION_UP && Utils.isLeftKey(event)) { listener.onKeyLeft(holdTime); } else if (event.getAction() == KeyEvent.ACTION_UP && Utils.isRightKey(event)) { diff --git a/catvod/src/main/java/com/github/catvod/crawler/Spider.java b/catvod/src/main/java/com/github/catvod/crawler/Spider.java index 9f6b1024d..6b8719a91 100644 --- a/catvod/src/main/java/com/github/catvod/crawler/Spider.java +++ b/catvod/src/main/java/com/github/catvod/crawler/Spider.java @@ -38,11 +38,11 @@ public abstract class Spider { return ""; } - public boolean isVideoFormat(String url) { + public boolean manualVideoCheck() { return false; } - public boolean manualVideoCheck() { + public boolean isVideoFormat(String url) { return false; } }