admin
2021-04-07 cbb88109494ffc7916f6639c20ce05c0cec941a9
BuWanVideo/src/com/weikou/beibeivideo/ui/recent/DownLoadAdapter.java
@@ -45,7 +45,9 @@
import com.weikou.beibeivideo.entity.VideoDetailInfo;
import com.weikou.beibeivideo.entity.VideoInfo;
import com.weikou.beibeivideo.ui.media.VideoDetailActivity;
import com.weikou.beibeivideo.ui.media.VideoDetailActivity2;
import com.weikou.beibeivideo.util.DownloadUtils;
import com.weikou.beibeivideo.util.VideoUtil;
public class DownLoadAdapter extends CursorAdapter {
   public interface IGetDeleteCallback {
@@ -250,15 +252,14 @@
                     int playingPosition = 0;
                     for (int i = 0; i < videoInfo.getVideoDetailList()
                           .size(); i++) {
                        VideoDetailInfo item = videoInfo
                              .getVideoDetailList().get(i);
                        VideoDetailInfo item =videoInfo.getVideoDetailList().get(i);
                        if (item.getId().equals(videoDetailId)) {
                           playingPosition = i;
                           break;
                        }
                     }
                     Intent intent = new Intent(v.getContext(),
                           VideoDetailActivity.class);
                           VideoDetailActivity2.class);
                     if (!TextUtils.isEmpty(DownloadUtils
                           .getOfflinePath(v.getContext(), videoId,
                                 videoDetailId))) {
@@ -266,6 +267,7 @@
                        intent.putExtra("video_info", videoInfo);
                        intent.putExtra("playing_position",
                              playingPosition);
                        intent.putExtra("from", "download");
                        con.startActivity(intent);
                     } else {
                        if (!ConnectionUtils.isNetworkAvailable(v
@@ -353,21 +355,20 @@
                           .get(videoDetailId);
                     if (videoInfo != null) {
                        int playingPosition = 0;
                        for (int i = 0; i < videoInfo
                              .getVideoDetailList().size(); i++) {
                           VideoDetailInfo item = videoInfo
                                 .getVideoDetailList().get(i);
                        for (int i = 0; i < videoInfo.getVideoDetailList().size(); i++) {
                           VideoDetailInfo item = videoInfo.getVideoDetailList().get(i);
                           if (item.getId().equals(videoDetailId)) {
                              playingPosition = i;
                              break;
                           }
                        }
                        Intent intent = new Intent(v.getContext(),
                              VideoDetailActivity.class);
                              VideoDetailActivity2.class);
                        intent.putExtra("orientation_landscape", true);
                        intent.putExtra("video_info", videoInfo);
                        intent.putExtra("playing_position",
                              playingPosition);
                        intent.putExtra("from", "download");
                        v.getContext().startActivity(intent);
                     }
                  }