Check thread for live

pull/123/head
FongMi 3 years ago
parent d380d80d3d
commit 9d7c263384
  1. 2
      app/src/main/java/com/fongmi/android/tv/api/LiveParser.java

@ -57,6 +57,7 @@ public class LiveParser {
private static void m3u(Live live, String text) {
Channel channel = Channel.create("");
for (String line : text.split("\n")) {
if (Thread.interrupted()) break;
if (line.startsWith("#EXTINF:")) {
Group group = live.find(Group.create(extract(line, GROUP)));
channel = group.find(Channel.create(extract(line, NAME)));
@ -71,6 +72,7 @@ public class LiveParser {
for (String line : text.split("\n")) {
String[] split = line.split(",");
if (split.length < 2) continue;
if (Thread.interrupted()) break;
if (line.contains("#genre#")) live.getGroups().add(Group.create(split[0]));
if (live.getGroups().isEmpty()) live.getGroups().add(Group.create(R.string.live_group));
if (split[1].contains("://")) {

Loading…
Cancel
Save