Changeset 29520


Ignore:
Timestamp:
07/22/14 13:30:10 (10 years ago)
Author:
obi
Message:

update tithek movie4

Location:
titan/plugins/tithek
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/movie4k.h

    r29519 r29520  
    88{
    99        debug(99, "link: %s", link);
    10         char* tmpstr = NULL, *url = NULL, *streamurl = NULL, *tmppath = NULL, *tmphost = NULL, *pos = NULL;
     10        int debuglevel = getconfigint("debuglevel", NULL);
     11        char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *url = NULL, *streamurl = NULL, *tmppath = NULL, *tmphost = NULL, *pos = NULL;
     12        titheklog(debuglevel, "/tmp/movie4k_streamurl_url0", NULL, NULL, NULL, link);
    1113
    1214        if(link == NULL || ostrncmp("http://", link, 7)) return NULL;
     
    2224        }
    2325
    24         tmpstr = gethttp(tmphost, tmppath, 80, NULL, NULL, 5000, NULL, 0);
    25 
     26        tmpstr1 = gethttp(tmphost, tmppath, 80, NULL, NULL, 5000, NULL, 0);
     27        titheklog(debuglevel, "/tmp/movie4k_streamurl_tmpstr1_a", NULL, NULL, NULL, tmpstr1);
     28
     29        tmpstr = string_resub("question.png", "underplayer", tmpstr1, 0);
     30        titheklog(debuglevel, "/tmp/movie4k_streamurl_tmpstr1_b", NULL, NULL, NULL, tmpstr);
     31        free(tmpstr1), tmpstr1 = NULL;
     32       
    2633        url = string_resub("<a target=\"_blank\" href=\"", "\"><", tmpstr, 0);
     34        titheklog(debuglevel, "/tmp/movie4k_streamurl_url1", NULL, NULL, NULL, url);
    2735
    2836        if(ostrstr(url, "http://") == NULL)
     
    3038                free(url), url = NULL;
    3139                url = string_resub("<iframe src=", "\" width", tmpstr, 0);
     40
     41                tmpstr2 = ostrcat("<iframe src=", url, 0, 0);
     42                tmpstr2 = ostrcat(tmpstr2, "\" width", 1, 0);
     43                tmpstr = string_replace_all(tmpstr2, "", tmpstr, 1);
     44
     45                titheklog(debuglevel, "/tmp/movie4k_streamurl_tmpstr2", NULL, NULL, NULL, tmpstr);
     46                titheklog(debuglevel, "/tmp/movie4k_streamurl_url2", NULL, NULL, NULL, url);
    3247        }
    3348       
     
    3651                free(url), url = NULL;
    3752                url = oregex(".*<iframe width=.*(http://.*)&width.*", tmpstr);
     53                titheklog(debuglevel, "/tmp/movie4k_streamurl_url3", NULL, NULL, NULL, url);
     54        }       
     55
     56        if(ostrstr(url, "http://clkrev.com") != NULL)
     57        {
     58                free(url), url = NULL;
     59                url = string_resub("<iframe src=\"", "\" width", tmpstr, 0);
     60                titheklog(debuglevel, "/tmp/movie4k_streamurl_url4", NULL, NULL, NULL, url);
    3861        }
    3962       
     
    4164        url = string_replace_all("\"", "", url, 1);
    4265
     66        if(url == NULL)
     67        {
     68                free(url), url = NULL;
     69                url = oregex(".*<iframe width=\".*(http://.*)&width=600&height=480\".*", tmpstr);
     70                titheklog(debuglevel, "/tmp/movie4k_streamurl_url5", NULL, NULL, NULL, url);
     71        }
     72        titheklog(debuglevel, "/tmp/movie4k_streamurl_url6", NULL, NULL, NULL, url);
     73
    4374        streamurl = hoster(url);
     75        titheklog(debuglevel, "/tmp/movie4k_streamurl_url7", NULL, NULL, NULL, url);
     76
    4477        free(url), url = NULL;
    4578        free(tmpstr), tmpstr = NULL;
     79        free(tmpstr2), tmpstr2 = NULL;
    4680        free(tmphost), tmphost = NULL;
    4781
     
    149183                                                id = string_resub("watch-movie-", ".html", link, 0);
    150184                                        if(id == NULL)
    151                                                 id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", link);
     185                                                id = oregex(".*tvshows-(.*[0-9]{4,10})-.*", link);
    152186
    153187
     
    372406                                                extra = getxmlentry(pos3, "quality ");
    373407
    374                                                 id = oregex(".*-online-film-(.*[0-9]{1,10}).html.*", pathnew);                                                 
     408                                                id = oregex(".*-online-film-(.*[0-9]{4,10}).html.*", pathnew);                                                 
    375409                                                if(id == NULL)
    376410                                                        id = string_resub("watch-movie-", ".html", pathnew, 0);
    377411                                                if(id == NULL)
    378                                                         id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", pathnew);
     412                                                        id = oregex(".*tvshows-(.*[0-9]{4,10})-.*", pathnew);
    379413                                                if(id == NULL)
    380414                                                        id = ostrcat(tmpid, NULL, 0, 0);
     
    404438                                        else
    405439                                        {
    406                                                 id = oregex(".*-online-film-(.*[0-9]{1,10}).html.*", path);                                                     
     440                                                id = oregex(".*-online-film-(.*[0-9]{4,10}).html.*", path);                                                     
    407441                                                if(id == NULL)
    408442                                                        id = string_resub("watch-movie-", ".html", path, 0);
    409443                                                if(id == NULL)
    410                                                         id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", path);
     444                                                        id = oregex(".*tvshows-(.*[0-9]{4,10})-.*", path);
    411445                                                if(id == NULL)
    412446                                                        id = ostrcat(tmpid, NULL, 0, 0);
     
    470504                                        if(url2 != NULL && ostrcmp(url, url2) != 0)
    471505                                                ostrcatbig(&line, " (Part1)", &maxlen, &bigpos);
     506/*
    472507                                        if(extra != NULL)
    473508                                        {
     
    476511                                                ostrcatbig(&line, ")", &maxlen, &bigpos);                                       
    477512                                        }
     513*/
    478514                                        ostrcatbig(&line, "#http://www.movie4k.to/", &maxlen, &bigpos);
    479515                                        ostrcatbig(&line, url, &maxlen, &bigpos);
     
    661697                path = pos + 1;
    662698        }
    663 /*
     699
    664700        if(!ostrncmp("tvshows-", path, 8))
    665701        {
    666702                debug(99, "path: %s",path);
    667703                tpath = ostrcat(path, NULL, 0, 0);
    668                 id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", path);
     704                id = oregex(".*tvshows-(.*[0-9]{4,10})-.*", path);
    669705                tpath = string_replace("tvshows-season-", "", tpath, 1);
    670706                tpath = string_replace(".html", "", tpath, 1);
     
    675711        }
    676712        else
    677 */
    678713                tpath = ostrcat(path, NULL, 0, 0);
    679714
     
    711746                                                {
    712747                                                        link = string_resub("<OPTION value=\"", "\"", ret1[j-1].part, 0);
    713                                                         id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", link);
     748                                                        id = oregex(".*tvshows-(.*[0-9]{4,10})-.*", link);
    714749                                                        episode = oregex(".*>Episode (.*[0-9]{1,10})</OPTION>.*", ret1[j-1].part);
    715750
  • titan/plugins/tithek/streamcloud.h

    r28962 r29520  
    6969        free(send), send = NULL;
    7070        debug(99, "tmpstr: %s", tmpstr);
     71
     72        if(tmpstr == NULL || ostrstr(tmpstr, "<head><title>404 Not Found</title></head>") != NULL)
     73        {
     74                textbox(_("Message"), _("The page is temporarily unavailable") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
     75                goto end;
     76        }
    7177
    7278        waitmsgbar(16, 0, _("Connect with Hoster wait 16 seconds"), 1);
Note: See TracChangeset for help on using the changeset viewer.