Exemple #1
0
        public void addd(singletor t)
        {
            string tqu = t.quali;

            int tindex =-1;
            for(int i=0;i<qualis.Count;i++)
            {
                if(qualis[i].quali == t.quali)
                {
                    tindex = i;
                    break;
                }
            }
            if(tindex==-1)
            {
                tindex = qualis.Count;
                qualis.Add(new aqseries(t.quali));
            }
            qualis[tindex].addd(t);
        }
Exemple #2
0
        void toAlist(singletor t)
        {
            int aindex = -1;
            for(int i=0;i<alist.Count;i++)
            {
                if(alist[i].simpletitle == t.series )
                {
                    aindex = i;
                    break;
                }
            }

            if(aindex == -1)
            {
                aindex = alist.Count;
                aseries ts = new aseries(t.fullseries, t.quali);
                ts.simpletitle = toSimplestring(t.fullseries);
                alist.Add(ts);

            }
            t.fullseries = alist[aindex].mergeseriesname(t.fullseries);
            alist[aindex].addd(t);
        }
Exemple #3
0
 public void addd(singletor t)
 {
     tors.Add(t);
 }
Exemple #4
0
        void parsepage( string purl, List<singletor> targetlist)
        {
            List<string> thepage = getContent(purl);

            //basic housekeeping and cleaning
            bool dropthis=false;
            bool dropthat=true;
            for(int i=thepage.Count-1;i>=0;i--)
            {
                if(thepage[i].Contains("tlisttheight"))
                {
                    dropthis=true;
                }
                if(thepage[i].Contains("tlistpages"))
                {
                    dropthat=false;
                }

                if(dropthis==true || dropthat==true)
                {
                    thepage.RemoveAt(i);
                }
            }

            singletor temptor = new singletor();
            temptor.fname="";
            temptor.episode="";
            temptor.furl="";
            temptor.leechers=0;
            temptor.seeders=0;
            temptor.quali="";
            temptor.series="";

            foreach(string str in thepage)
            {

                if(str.Contains("tlistmn"))
                {
                    if(temptor.fname!="")
                    {
                        temptor.fname =  WebUtility.HtmlDecode(temptor.fname);

                        //	textBox1.Text +=	 temptor.fname+" added\r\n";

                        temptor.fullseries = rg_getseriesname(temptor.fname);

                        temptor.series = toSimplestring(temptor.fullseries);

                        temptor.quali = releasegroup.getQuality(temptor.fname);

                        //nman.addd(temptor);
                        //torlist.Add(temptor);
                        targetlist.Add(temptor);

                        temptor.fname="";
                        temptor.episode="";
                        temptor.furl="";
                        temptor.leechers=0;
                        temptor.seeders=0;
                        temptor.quali="";
                        temptor.series="";
                    }

                }

                if(str.Contains("torrentinfo"))
                {
                    string _fn = str.Substring(str.IndexOf(">")+1);
                    temptor.fname= _fn;
                }
                if(str.Contains("tlistsn"))
                {
                    string _fn = str.Substring(str.LastIndexOf(">")+1);
                    int _num= Convert.ToInt32(_fn);
                    temptor.seeders = _num;
                }
                if(str.Contains("tlistln"))
                {
                    string _fn = str.Substring(str.LastIndexOf(">")+1);
                    int _num= Convert.ToInt32(_fn);
                    temptor.leechers = _num;
                }
                if(str.Contains("page=download"))
                {
                    int ustart = str.IndexOf("http");
                    int uend = str.LastIndexOf("title=")-2;

                    string _url = str.Substring(ustart, uend-ustart);
                    _url =  WebUtility.HtmlDecode(_url);
                    //_url = _url.Replace("#38;","");
                    temptor.furl = _url;
                }

            }
        }