| | |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.domain.entity.PlayUrl; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil2; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.imp.juhe.FunTVService; |
| | | import com.yeshi.buwan.service.imp.juhe.IqiyiService; |
| | | import com.yeshi.buwan.service.imp.juhe.PPTVService; |
| | | import com.yeshi.buwan.service.imp.juhe.SoHuService; |
| | | import com.yeshi.buwan.service.imp.juhe.*; |
| | | import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service; |
| | | import com.yeshi.buwan.sohu.SoHuUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import org.hibernate.HibernateException; |
| | |
| | | public class VideoDetailUtil { |
| | | @Resource |
| | | private IqiyiUtil iqiyiUtil; |
| | | |
| | | @Resource |
| | | private SoHuUtil soHuUtil; |
| | | |
| | | @Resource |
| | | private IqiyiService iqiyiService; |
| | | |
| | | @Resource |
| | | private Iqiyi2Service iqiyi2Service; |
| | | |
| | | @Resource |
| | | private SoHuService soHuService; |
| | | |
| | |
| | | } |
| | | |
| | | private List<VideoDetailInfo> getVideoDetailList(String videoid, VideoResource vr) { |
| | | if (vr.getName().contains("爱奇艺")) { |
| | | if (vr.getName().contains("爱奇艺2")) { |
| | | return iqiyi2Service.getVideoDetailList(videoid); |
| | | } else if (vr.getName().contains("爱奇艺")) { |
| | | return iqiyiService.getVideoDetailList(videoid); |
| | | } else if (vr.getName().contains("搜狐")) { |
| | | return soHuService.getVideoDetailList(videoid); |
| | |
| | | } |
| | | |
| | | public VideoDetailInfo getLatestVideoDetail(String videoid, VideoResource vr) { |
| | | if (vr.getName().contains("爱奇艺")) { |
| | | if (vr.getName().contains("爱奇艺2")) { |
| | | return iqiyi2Service.getLatestVideoDetail(videoid); |
| | | } else if (vr.getName().contains("爱奇艺")) { |
| | | return iqiyiService.getLatestVideoDetail(videoid); |
| | | } else if (vr.getName().contains("搜狐")) { |
| | | return soHuService.getLatestVideoDetail(videoid); |
| | |
| | | } |
| | | |
| | | public int getShowType(String videoid, VideoResource vr) { |
| | | if (vr.getName().contains("爱奇艺")) { |
| | | if (vr.getName().contains("爱奇艺2")) { |
| | | return iqiyi2Service.getShowType(videoid); |
| | | } else if (vr.getName().contains("爱奇艺")) { |
| | | return iqiyiUtil.getShowType(videoid); |
| | | } else if (vr.getName().contains("搜狐")) { |
| | | return soHuUtil.getShowType(videoid); |
| | |
| | | return funTVService.getPlayUrl(detailSystemId, id, type, resourceid, videoid); |
| | | else if (resourceid == 21)//acfun |
| | | return videoInfoService.getPlayUrl(detailSystemId, id, type, resourceid, videoid); |
| | | else if (resourceid == 22)//爱奇艺2 |
| | | return iqiyi2Service.getPlayUrl(detailSystemId, resourceid, id, videoid); |
| | | return null; |
| | | } |
| | | |
| | | } |