DetailActivity.java+push

pull/99/head
watson1982 2 years ago committed by GitHub
parent bcc47f1e8c
commit 39293e0702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java

@ -126,6 +126,7 @@ public class DetailActivity extends BaseActivity {
private SeriesAdapter seriesAdapter;
public String vodId;
public String sourceKey;
public String firstsourceKey;
boolean seriesSelect = false;
private View seriesFlagFocus = null;
private boolean isReverse;
@ -603,13 +604,18 @@ public class DetailActivity extends BaseActivity {
vodInfo = new VodInfo();
vodInfo.setVideo(mVideo);
vodInfo.sourceKey = mVideo.sourceKey;
sourceKey = mVideo.sourceKey;
tvName.setText(mVideo.name);
setTextShow(tvSite, "来源:", ApiConfig.get().getSource(mVideo.sourceKey).getName());
setTextShow(tvSite, "来源:", ApiConfig.get().getSource(firstsourceKey).getName());
setTextShow(tvYear, "年份:", mVideo.year == 0 ? "" : String.valueOf(mVideo.year));
setTextShow(tvArea, "地区:", mVideo.area);
setTextShow(tvLang, "语言:", mVideo.lang);
setTextShow(tvType, "类型:", mVideo.type);
if (!firstsourceKey.equals(sourceKey)) {
setTextShow(tvType, "类型:", "[" + ApiConfig.get().getSource(sourceKey).getName() + "] 解析");
} else {
setTextShow(tvType, "类型:", mVideo.type);
}
setTextShow(tvActor, "演员:", mVideo.actor);
setTextShow(tvDirector, "导演:", mVideo.director);
setTextShow(tvDes, "内容简介:", removeHtmlTag(mVideo.des));
@ -711,6 +717,7 @@ public class DetailActivity extends BaseActivity {
if (vid != null) {
vodId = vid;
sourceKey = key;
firstsourceKey = key;
showLoading();
sourceViewModel.getDetail(sourceKey, vodId);
boolean isVodCollect = RoomDataManger.isVodCollect(sourceKey, vodId);
@ -737,11 +744,13 @@ public class DetailActivity extends BaseActivity {
mGridView.setSelection(index);
vodInfo.playIndex = index;
//保存历史
insertVod(sourceKey, vodInfo);
insertVod(firstsourceKey, vodInfo);
// insertVod(sourceKey, vodInfo);
} else if (event.obj instanceof JSONObject) {
vodInfo.playerCfg = ((JSONObject) event.obj).toString();
//保存历史
insertVod(sourceKey, vodInfo);
insertVod(firstsourceKey, vodInfo);
// insertVod(sourceKey, vodInfo);
}
}

Loading…
Cancel
Save