| | |
| | | import com.yeshi.base.entity.video.VideoResource; |
| | | import com.yeshi.base.ui.BaseActivity; |
| | | import com.yeshi.base.utils.BeibeiConstant; |
| | | import com.yeshi.base.utils.JsonUtil; |
| | | import com.yeshi.base.utils.RouteConstant; |
| | | import com.yeshi.base.utils.ad.AdUtil; |
| | | import com.yeshi.base.utils.ad.GDTConstant; |
| | |
| | | } |
| | | |
| | | |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | final VideoInfo videoInfo = gson |
| | | final VideoInfo videoInfo = JsonUtil.videoGson |
| | | .fromJson(jsonObject.getJSONObject("Data") |
| | | .toString(), |
| | | new TypeToken<VideoInfo>() { |
| | |
| | | Header[] headers, JSONObject jsonObject) |
| | | throws Exception { |
| | | if (jsonObject.getBoolean("IsPost")) { |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | VideoResource resource = gson.fromJson( |
| | | VideoResource resource = JsonUtil.videoGson.fromJson( |
| | | jsonObject.getJSONObject("Data") |
| | | .getJSONObject("Resource") |
| | | .toString(), |
| | |
| | | values.put(WatchHistoryTable.VIDEO_DETAIL_ID, videoDetailId); |
| | | values.put(WatchHistoryTable.VIDEO_THIRD_TYPE, |
| | | videoInfo.getThirdType()); |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE).create(); |
| | | values.put(WatchHistoryTable.VIDEO_DETAIL, gson.toJson(videoInfo)); |
| | | values.put(WatchHistoryTable.VIDEO_DETAIL, JsonUtil.videoGson.toJson(videoInfo)); |
| | | values.put(WatchHistoryTable.WATCH_TIME, 0); |
| | | values.put(WatchHistoryTable.VIDEO_RESOURCE, from); |
| | | values.put(WatchHistoryTable.VIDEO_RESOURCE_ID, resoureID); |