| | |
| | | |
| | | @Resource |
| | | private FunTVAlbumDao funTVAlbumDao; |
| | | |
| | | @Resource |
| | | private FunTVAlbumVideoMapDao funTVAlbumVideoMapDao; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private VideoManager videoManager; |
| | | |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | |
| | | static Logger logger = Logger.getLogger(FunTVService.class); |
| | | |
| | |
| | | // 获取最新一集的信息 |
| | | List<FunTVVideo> plist = funTVVideoDao.listByAid(p.getAid(), "num", Sort.Direction.DESC, 0, 1); |
| | | if (plist.size() > 0) { |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | detailList.add(FunTVUtil.convertFunTVVideoToVideoDetail(plist.get(0), p)); |
| | | vi.setVideoDetailList(detailList); |
| | | } |
| | |
| | | |
| | | final VideoInfo info = FunTVUtil.convertFunTVAlbumToVideoInfo(p); |
| | | // 类型计算 |
| | | final List<Integer> typeList = new ArrayList<Integer>(); |
| | | final List<Integer> typeList = new ArrayList<>(); |
| | | |
| | | int type = FunTVUtil.getFunTVAlbumType(p); |
| | | boolean exist = false; |
| | |
| | | return; |
| | | } else {// 需要新加入videoinfo |
| | | Serializable id = addVideoInfo(info, p); |
| | | List<Integer> typeList = new ArrayList<Integer>(); |
| | | List<Integer> typeList = new ArrayList<>(); |
| | | typeList = FunTVUtil.getShortVideoType(p, p.getCate(), p.getSubCate()); |
| | | |
| | | if (typeList == null || typeList.size() <= 0) |
| | |
| | | if (vft != null && vft.getAid() != null) {// 按节目查找视频 |
| | | String aid = vft.getAid(); |
| | | FunTVAlbum album = funTVAlbumDao.get(aid); |
| | | |
| | | if (album == null) { |
| | | resourceVideoService.delete(videoid, FunTVUtil.RESOURCE_ID + ""); |
| | | } |
| | | final String type = album.getVideoType(); |
| | | Sort.Direction sort = Sort.Direction.ASC; |
| | | if (type != null) |
| | |
| | | return detailList; |
| | | } else if (vft.getVid() != null) {// 单个视频 |
| | | FunTVVideo pv = funTVVideoDao.get(vft.getVid()); |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | VideoDetailInfo detail = new VideoDetailInfo(); |
| | | detail.setId(Long.parseLong(pv.getVid())); |
| | | detail.setExtraId(pv.getId() + ""); |
| | | detail.setName(pv.getTitle()); |
| | | detail.setTag(pv.getDesc()); |
| | | detail.setType("funtvvideo"); |
| | | List<VideoUrl> urlList = new ArrayList<VideoUrl>(); |
| | | List<VideoUrl> urlList = new ArrayList<>(); |
| | | VideoUrl vu = new VideoUrl(); |
| | | vu.setAdmin(null); |
| | | vu.setBaseUrl(pv.getPlayUrl()); |
| | |
| | | detailList.add(detail); |
| | | return detailList; |
| | | } |
| | | }else{//删除来源 |
| | | resourceVideoService.delete(videoid,FunTVUtil.RESOURCE_ID+""); |
| | | } |
| | | |
| | | return null; |