pull/1/head
DreamDSTR 4 years ago
parent dd3b5d05e2
commit 4a2321ebd1
  1. 20
      app/src/main/java/com/github/tvbox/osc/viewmodel/SourceViewModel.java

@ -99,13 +99,19 @@ public class SourceViewModel extends ViewModel {
if (sortJson != null) {
AbsSortXml sortXml = sortJson(sortResult, sortJson);
if (sortXml != null && Hawk.get(HawkConfig.HOME_REC, 0) == 1) {
getHomeRecList(sourceBean, null, new HomeRecCallback() {
@Override
public void done(List<Movie.Video> videos) {
sortXml.videoList = videos;
sortResult.postValue(sortXml);
}
});
AbsXml absXml = json(null, sortJson, sourceBean.getKey());
if (absXml != null && absXml.movie != null && absXml.movie.videoList != null && absXml.movie.videoList.size() > 0) {
sortXml.videoList = absXml.movie.videoList;
sortResult.postValue(sortXml);
} else {
getHomeRecList(sourceBean, null, new HomeRecCallback() {
@Override
public void done(List<Movie.Video> videos) {
sortXml.videoList = videos;
sortResult.postValue(sortXml);
}
});
}
} else {
sortResult.postValue(sortXml);
}

Loading…
Cancel
Save