Exemplo n.º 1
0
        public void BeginExecution()
        {
            if (extBase != null)
            {
                goto SKIP;
            }
            else
            {
                switch (ao.term.SiteFromString())
                {
                case Site.HAnime:
                    extBase = GenerateExtractorFromSite(Site.HAnime);
                    if (!ao.d)
                    {
                        updater(taskIndex, $"{ao.term.SkipCharSequence("https://hanime.tv/videos/hentai/".ToCharArray())} {extBase.GetDownloadUri(ao.term)}");
                        return;
                    }
                    break;

                case Site.TwistMoe:
                    extBase = GenerateExtractorFromSite(Site.TwistMoe);
                    break;

                case Site.Vidstreaming:
                    extBase = GenerateExtractorFromSite(Site.Vidstreaming);
                    break;

                default:
                    if (ao.hS)
                    {
                        extBase = GenerateExtractorFromSite(Site.HAnime);
                    }
                    else if (ao.gS)
                    {
                        extBase = GenerateExtractorFromSite(Site.Vidstreaming);
                    }
                    else if (ao.tS)
                    {
                        extBase = GenerateExtractorFromSite(Site.TwistMoe);
                    }
                    break;
                }
            }
            SKIP :;

            videoDownloadThread = new Thread(() => extBase.Begin());
            videoDownloadThread.Start();
            videoDownloadThread.Join(); // wait;
        }
Exemplo n.º 2
0
        public void BeginExecution()
        {
            if (extBase != null)
            {
                goto SKIP;
            }
            else
            {
                extBase = ao.term.SiteFromString().GenerateExtractor(ao, taskIndex, updater);
            }
            SKIP :;

            videoDownloadThread = new Thread(() => extBase.Begin());
            videoDownloadThread.Start();
            videoDownloadThread.Join(); // wait;
        }