From 66ae716f2b7145808d69d90d64233bb549647234 Mon Sep 17 00:00:00 2001 From: FongMi Date: Sat, 10 May 2025 15:51:22 +0800 Subject: [PATCH] Clean code --- .../com/fongmi/android/tv/player/extractor/TVBus.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/fongmi/android/tv/player/extractor/TVBus.java b/app/src/main/java/com/fongmi/android/tv/player/extractor/TVBus.java index 9f54e3d60..8548b3db3 100644 --- a/app/src/main/java/com/fongmi/android/tv/player/extractor/TVBus.java +++ b/app/src/main/java/com/fongmi/android/tv/player/extractor/TVBus.java @@ -47,17 +47,18 @@ public class TVBus implements Source.Extractor, Listener { return check(); } + private void change() throws Exception { + Setting.putBootLive(true); + App.post(() -> System.exit(0), 100); + throw new ExtractException(ResUtil.getString(R.string.error_play_url)); + } + private String check() throws Exception { if (hls == null) return ""; if (!hls.startsWith("-")) return hls; throw new ExtractException(ResUtil.getString(R.string.error_play_code, hls)); } - private void change() { - Setting.putBootLive(true); - App.post(() -> System.exit(0), 250); - } - @Override public void stop() { if (tvcore != null) tvcore.stop();