|
|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|