private string SearchPrompt(SearchReq sj, ref int np) { for (int idx = 0; idx < sj.actualHits.Count; idx++) { ADLUpdates.CallLogUpdate($"{idx} -- {sj.actualHits[idx].name} | Ratings: {sj.actualHits[idx].GetRating()}/10\n tags:{sj.actualHits[idx].tagsAsString()}\n desc:{new string(sj.actualHits[idx].description.Replace("<p>", string.Empty).Replace("</p>", string.Empty).Replace("\n", string.Empty).Take(60).ToArray())}\n\n"); } ADLUpdates.CallLogUpdate($"\nCommands: \n page {{page}}/{sj.nbPages}\n select {{episode num}}"); c: String[] input = Console.ReadLine().ToLower().Split(' '); switch (input[0]) { case "select": videoInfo = new Constructs.Video() { hentai_video = new HentaiVideo() { slug = $"https://hanime.tv/videos/hentai/{sj.actualHits[int.Parse(input[1])].slug}" } }; ADLUpdates.CallThreadChange(false); return($"https://hanime.tv/videos/hentai/{sj.actualHits[int.Parse(input[1])].slug}"); case "page": Console.Clear(); np = int.Parse(input[1]); return("CNT"); default: goto c; } }
public override void Begin() { videoInfo = new Constructs.Video(); videoInfo.hentai_video = new HentaiVideo(); Series = new List <HentaiVideo>(); headersCollection = new WebHeaderCollection(); if (!ao.term.IsValidUri()) { ao.term = Search(); } if (ao.term == null) { updateStatus(taskIndex, "Failed to get any videos related to your search!"); return; } FindAllVideos(ao.term, false); if (!ao.l) { downloadTo = $"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}anime{Path.DirectorySeparatorChar}{Series[0].brand}"; } else { downloadTo = Path.Combine(ao.export, Series[0].brand); } Directory.CreateDirectory(downloadTo); Download(downloadTo, ao.mt, false, ao.c); }
public GoGoStream(string term, bool multithread = false, string path = null, bool skip = false, int ti = -1, Action <int, string> u = null) : base(null, ti, u, Site.Vidstreaming) { videoInfo = new Constructs.Video(); videoInfo.hentai_video = new HentaiVideo(); Series = new List <HentaiVideo>(); headersCollection = new WebHeaderCollection(); if (!term.IsValidUri()) { term = Search(); } if (term == null) { updateStatus(taskIndex, "Failed to get any videos related to your search!"); return; } FindAllVideos(term, false); if (path == null) { downloadTo = $"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}anime{Path.DirectorySeparatorChar}{Series[0].brand}"; } else { downloadTo = Path.Combine("anime", Series[0].brand); } Directory.CreateDirectory(downloadTo); Download(downloadTo, multithread, false, skip); }
public override void Begin() { if (ao.tS) { ao.term = Search(); } GenerateHeaders(); videoInfo = new Constructs.Video(); Download(ao.term, ao.mt, ao.cc); }