| | |
| | | import com.yeshi.buwan.dto.log.BaseLog; |
| | | import com.yeshi.buwan.dto.statistic.video.VideoDetailStatisticData; |
| | | import com.yeshi.buwan.exception.video.VideoPlayException; |
| | | import com.yeshi.buwan.service.manager.APPManager; |
| | | import com.yeshi.buwan.videos.mogotv.MogoTVUtil; |
| | | import com.yeshi.buwan.videos.pptv.PPTVApiUtil; |
| | | import com.yeshi.buwan.videos.pptv.PPTVUtil; |
| | |
| | | |
| | | @Resource |
| | | private DeviceAdStrategyService deviceAdStrategyService; |
| | | |
| | | @Resource |
| | | private APPManager appManager; |
| | | |
| | | private final Logger userPlayLogger = LoggerFactory.getLogger("videoPlayUser"); |
| | | |
| | |
| | | |
| | | info.setWatchCount("" + (int) (Math.random() * 1000)); |
| | | |
| | | //视频过滤 |
| | | filterVideo(acceptData, info); |
| | | |
| | | JSONArray array = new JSONArray(); |
| | | JSONObject obj = new JSONObject(); |
| | | |
| | |
| | | out.print(JsonUtil.loadTrueJson(StringUtil.outPutResultJson(Utils.convertVideo(info)), array.toString(), |
| | | obj.toString())); |
| | | } |
| | | } |
| | | |
| | | //视频过滤 |
| | | private void filterVideo(AcceptData acceptData, VideoInfo video) { |
| | | //控制前端列表中的来源显示问题 |
| | | if ("48".equalsIgnoreCase(acceptData.getDetailSystem().getId())) { |
| | | if (video.getArea() != null && video.getArea().contains("韩国")) { |
| | | //判断当前版本是否正在上线 |
| | | if (appManager.isOnline(acceptData.getDetailSystem().getId(), acceptData.getVersion(), acceptData.getChannel())) { |
| | | //如果在上线就删除未选中的资源,并且将当前资源变为韩迷TV |
| | | for (int i = 0; i < video.getResourceList().size(); i++) { |
| | | if (!video.getResourceList().get(i).isChecked()) { |
| | | video.getResourceList().remove(i--); |
| | | } |
| | | } |
| | | if (video.getResourceList().size() > 0) { |
| | | video.getResourceList().get(0).setName("PP视频"); |
| | | //在ID前面添加native标识 |
| | | for (VideoDetailInfo videoDetailInfo : video.getVideoDetailList()) { |
| | | videoDetailInfo.setExtraId("native_" + videoDetailInfo.getExtraId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | @RequireUid |
| | |
| | | attentionInfo.put("IsAttention", attention.isAttention()); |
| | | obj.put("Attention", attentionInfo); |
| | | } |
| | | |
| | | //视频过滤 |
| | | filterVideo(acceptData, info); |
| | | |
| | | UserInfo user = userService.getUserInfo(acceptData.getUid()); |
| | | if (VersionUtil.isGraterThan390(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | String sessionId = createVideoDetailSessionId(acceptData, loginUid, info.getName(), videoId, resourceId); |