Merge pull request #119 from CatVodTVOfficial/dev

Fix
pull/1/head
DreamDSTR 4 years ago committed by GitHub
commit 7325aefe6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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