pull/594/head
jhengazuki 7 months ago
parent 09ad44ca23
commit 56dafb3972
  1. 16
      app/src/main/java/com/fongmi/android/tv/model/LiveViewModel.java

@ -72,17 +72,19 @@ public class LiveViewModel extends ViewModel {
public void getXml(Live item) {
execute(XML, () -> {
boolean result = false;
for (String url : item.getEpgXml()) {
try {
if (EpgParser.start(item, url)) result = true;
} catch (Exception e) {
e.printStackTrace();
}
}
for (String url : item.getEpgXml()) if (parseXml(item, url)) result = true;
return result;
});
}
private boolean parseXml(Live item, String url) {
try {
return EpgParser.start(item, url);
} catch (Exception ignored) {
return false;
}
}
public void getEpg(Channel item) {
String date = formatDate.format(new Date());
String url = item.getEpg().replace("{date}", date);

Loading…
Cancel
Save