protected void BindList() { switch (type) { case "kuaib": var cpl = MovieUrlKuaibView.GetModelList(string.Format("MovieID={0}", id)); rp_List.DataSource = cpl; rp_List.DataBind(); break; case "baidu": var cpl_baidu = MovieUrlBaiduView.GetModelList(string.Format("MovieID={0}", id)); rp_List.DataSource = cpl_baidu; rp_List.DataBind(); break; case "mag": var cpl_mag = MovieUrlMagView.GetModelList(string.Format("MovieID={0}", id)); rp_List.DataSource = cpl_mag; rp_List.DataBind(); break; default: var df = MovieUrlKuaibView.GetModelList(string.Format("MovieID={0}", id)); rp_List.DataSource = df; rp_List.DataBind(); break; } }
/// <summary> /// 生成电影页面 /// </summary> /// <param name="id"></param> protected void CreateMoviePage(int id) { MovieInfo m = MovieInfoView.GetModelByID(id.ToS()); if (m.Id > 0) { Class c = MovieInfoView.GetClass(m); Voodoo.Basement.CreatePage.CreateContentPage(m, c); var Dramas = MovieDramaView.GetModelList(string.Format("movieid={0}", id)); var Baidus = MovieUrlBaiduView.GetModelList(string.Format("movieid={0}", id)); var Kuaibos = MovieUrlKuaibView.GetModelList(string.Format("movieid={0}", id)); foreach (var d in Dramas) { Voodoo.Basement.CreatePage.CreateDramapage(d, c); } foreach (var d in Baidus) { Voodoo.Basement.CreatePage.CreateDramapage(d, c); } foreach (var d in Kuaibos) { Voodoo.Basement.CreatePage.CreateDramapage(d, c); } Response.Write("电影" + m.Title + "完成"); } else { Response.Write("不存在"); } }
/// <summary> /// 获取百度下一集地址 /// </summary> /// <param name="kuai"></param> /// <returns></returns> public static MovieUrlBaidu GetNextBaidu(MovieUrlBaidu kuai) { List <MovieUrlBaidu> lresult = MovieUrlBaiduView.GetModelList(string.Format("MovieID={0} and id>{1} order by id asc", kuai.MovieID, kuai.Id)); if (lresult.Count == 0) { return(null); } else { return(lresult.First()); } }
protected void SaveDramas(int MovieID, List <Drama> dramas) { if (dramas.Count == 0) { return; } MovieInfo mv = MovieInfoView.GetModelByID(MovieID.ToS()); List <MovieUrlBaidu> baidus = new List <MovieUrlBaidu>(); List <MovieUrlKuaib> kuaibos = new List <MovieUrlKuaib>(); if (dramas[0].Type == "baidu") { baidus = MovieUrlBaiduView.GetModelList(string.Format("movieid={0}", MovieID)); foreach (var drama in dramas) { if (baidus.Where(p => p.Title == drama.Title).Count() == 0) { MovieUrlBaidu m = new MovieUrlBaidu(); m.Enable = true; m.MovieID = mv.Id; m.MovieTitle = mv.Title; m.Title = drama.Title; m.UpdateTime = DateTime.UtcNow.AddHours(8); m.Url = drama.Url; MovieUrlBaiduView.Insert(m); } } } else { kuaibos = MovieUrlKuaibView.GetModelList(string.Format("movieid={0}", MovieID)); foreach (var drama in dramas) { if (kuaibos.Where(p => p.Title == drama.Title).Count() == 0) { MovieUrlKuaib m = new MovieUrlKuaib(); m.Enable = true; m.MovieID = mv.Id; m.MovieTitle = mv.Title; m.Title = drama.Title; m.UpdateTime = DateTime.UtcNow.AddHours(8); m.Url = drama.Url; MovieUrlKuaibView.Insert(m); } } } }
protected void btn_createPage_Click(object sender, EventArgs e) { Class c = ClassView.GetModelByID(cls.ToS()); string[] ids = WS.RequestString("id").Split(','); foreach (string id in ids) { MovieInfo mv = MovieInfoView.GetModelByID(id); CreatePage.CreateContentPage(mv, c); var kuaibos = MovieUrlKuaibView.GetModelList(string.Format("MovieID={0}", id)); var baidus = MovieUrlBaiduView.GetModelList(string.Format("MovieID={0}", id)); var dramas = MovieDramaView.GetModelList(string.Format("MovieID={0}", id)); foreach (var kuaib in kuaibos) { CreatePage.CreateDramapage(kuaib, c); } foreach (var baidu in baidus) { CreatePage.CreateDramapage(baidu, c); } foreach (var drama in dramas) { CreatePage.CreateDramapage(drama, c); } } if (cls > 0) { try { CreatePage.CreateListPage(c, 1); } catch { } } CreatePage.GreateIndexPage(); Js.Jump(url); }