Esempio n. 1
0
 public FolgenItem(string Name, bool watched, int availablesize, Folge thisFolge)
 {
     InitializeComponent();
     NameLabel.Text       = Name;
     Watchlistanswer.Text = watched ? "ja" : "nein";
     panel1.Width         = availablesize;
     ThisFolge            = thisFolge;
 }
Esempio n. 2
0
        public DownloadItem(Folge folgetodownload, int staffel, string serienname)
        {
            InitializeComponent();

            Folgetodownload = folgetodownload;
            Staffel         = staffel;
            SerienName      = serienname;

            //MessageBox.Show("Folge: " + folgetodownload.FolgenName + Environment.NewLine + "Staffel: " + staffel + Environment.NewLine + "Serie: " + serienname);

            label1.Text = folgetodownload.FolgenName.Split('/')[0];
        }
Esempio n. 3
0
        public void Download(Folge folgetodownload, int selectedstaffel, string SerienName)
        {
            if (int.Parse(Settings.Default.MaxSimDownloads) != 0)
            {
                while (int.Parse(Settings.Default.MaxSimDownloads) <= Form1.ActiveForm.Controls.Find("DownloadingPanel", true)[0].Controls.Count)
                {
                    ;
                }
            }

            if (folgetodownload.Downloading)
            {
                DownloadItem di = new DownloadItem(folgetodownload, selectedstaffel, SerienName);
                di.BeginDownload();
                di.Location = new System.Drawing.Point(10, Form1.ActiveForm.Controls.Find("DownloadingPanel", true)[0].Controls.Count * 260 + 10);
                DownloadingPanel.Invoke((MethodInvoker)(() => DownloadingPanel.Controls.Add(di)));
            }
        }
Esempio n. 4
0
        public Folge getDownloadLinks(Folge SelectedFolge)
        {
            foreach (KeyValuePair <string, string> host in SelectedFolge.HosterandLink)
            {
                MyWebBrowserClone.Load(SelectedFolge.FolgenURL + host.Key);
                while (MyWebBrowserClone.thsi.IsBusy)
                {
                    ;
                }

                MyWebBrowserClone.DocumentText = "";
                while (MyWebBrowserClone.GetDocument() == "")
                {
                    ;
                }

                string help2 = "";
                MyWebBrowserClone.thsi.Invoke((MethodInvoker) delegate()
                {
                    using (AutoJSContext context = new AutoJSContext(MyWebBrowserClone.thsi.Window))
                    {
                        context.EvaluateScript(@"if (true) {

    s = '6LeiZSYUAAAAAI3JZXrRnrsBzAdrZ40PmD57v_fs'
    var t2 = $('section.serie .hoster-player').data('lid');
                        document.getElementsByTagName('body')[0].innerHTML = '<div id=""challenge""></div>';
                        function t(e)
                        {
                            0 < t2 && $.ajax({
                                url: 'ajax/embed.php',
			type: 'POST',
			dataType: 'JSON',
			data:
                                {
                                    LID: t2,
                ticket: e
            },
            success: function(e) {
                                    document.getElementsByTagName('html')[0].innerHTML = e.link;
                                },
            error: function() {
                                    document.getElementsByTagName('html')[0].innerHTML = 'Failed';
                                }
                            })

    }
            0 < s.length ? (void 0 === series.grendered && (grecaptcha.render('challenge', {
                sitekey: s,
        size: 'invisible',
        callback: t
            }), series.grendered = !0), grecaptcha.execute())  : t('')
}", out help2);
                    }
                });

                MyWebBrowserClone.Bringtofront();

                if (Settings.Default.AutoSolve)
                {
                    BypassGoogleCaptcha bypass = new BypassGoogleCaptcha(MyWebBrowserClone.thsi, SelectedFolge.FolgenURL + host.Key);
                    bypass.GetVideoLink();
                }

                string DirectLink = "";

                if (host.Key == "vivo")
                {
                    while (!MyWebBrowserClone.GetDocument().Contains("vivo.sx/"))
                    {
                        Thread.Sleep(1000);
                    }

                    DirectLink = "https://vivo.sx/" + MyWebBrowserClone.GetDocument().Split(new string[] { "vivo.sx/" }, StringSplitOptions.RemoveEmptyEntries)[1].Split('<')[0];
                }
                else if (host.Key == "VeryStream")
                {
                    while (!MyWebBrowserClone.GetDocument().Split(new string[] { "hoster-player" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new string[] { "</div>" }, StringSplitOptions.None)[0].Contains("iframe"))
                    {
                        Thread.Sleep(1000);
                    }

                    string help = MyWebBrowserClone.GetDocument();
                    help = help.Split(new string[] { "hoster-player" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new string[] { "<iframe " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new string[] { "src=\"" }, StringSplitOptions.RemoveEmptyEntries)[1].Split('\"')[0];


                    LinkExtractors.VeryStreamExtractor vsd = new LinkExtractors.VeryStreamExtractor();
                    DirectLink = vsd.GetDirectVideoLink(help);
                    vsd.Destroy();
                    vsd = null;
                }

                MyWebBrowserClone.Sendtoback();
                SelectedFolge.HosterandLink[host.Key] = DirectLink;

                break;
            }

            return(SelectedFolge);
        }