Changeset 41932


Ignore:
Timestamp:
02/24/18 20:43:05 (6 years ago)
Author:
obi
Message:

fix kino

File:
1 edited

Legend:

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

    r41929 r41932  
    6363                {
    6464                        path = string_replace_all("kinox.to", "", search, 0);
    65                         path = string_replace_all(getconfig("tithek_kinox_url", NULL), "", search, 0);
     65                        path = string_replace_all(getconfig("kinox_url", NULL), "", search, 0);
    6666                        path = string_replace_all("http:///", "", search, 0);
    6767                        path = string_replace_all("https:///", "", search, 0);
     
    7474                char *cmd = NULL;
    7575                cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", newurl, 0, 0);
    76 printf("cmd: %s\n", cmd);
    77 
     76                debug(99, "cmd: %s", cmd);
    7877                tmpstr = command(cmd);
    79 printf("tmpstr: %s\n", tmpstr);
     78                free(cmd), cmd = NULL;
    8079
    8180                free(cmd), cmd = NULL;
     
    119118                                                                                                                                       
    120119//                                      tmpstr1 = gethttp("kinox.to", path, 80, NULL, NULL, 10000, NULL, 0);
    121                                         newurl = ostrcat(getconfig("tithek_kinox_url", NULL), "/", 0, 0);
     120                                        newurl = ostrcat(getconfig("kinox_url", NULL), "/", 0, 0);
    122121                                        newurl = ostrcat(newurl, path, 1, 0);
    123                                         tmpstr1 = gethttps(newurl, NULL, NULL, NULL, NULL, NULL, 1);
     122//                                      tmpstr1 = gethttps(newurl, NULL, NULL, NULL, NULL, NULL, 1);
     123
     124                                        char *cmd = NULL;
     125                                        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", newurl, 0, 0);
     126                                        debug(99, "cmd: %s", cmd);
     127                                        tmpstr1 = command(cmd);
     128                                        free(cmd), cmd = NULL;
     129
    124130                                        free(newurl), newurl = NULL;
    125131
     
    138144                                        title = ostrcat(title , lang, 1, 0);
    139145
    140                                         url = ostrcat(getconfig("tithek_kinox_url", NULL), "/", 0, 0);
     146                                        url = ostrcat(getconfig("kinox_url", NULL), "/", 0, 0);
    141147                                        url = ostrcat(url, path, 1, 0);
    142148
     
    154160                                                line = ostrcat(line, "#", 1, 0);
    155161                                                line = ostrcat(line, url, 1, 0);
    156                                                 line = ostrcat(line, "#https://", 1, 0);
    157                                                 line = ostrcat(line, getconfig("tithek_kinox_url", NULL), 1, 0);
     162                                                line = ostrcat(line, "#http://", 1, 0);
     163                                                line = ostrcat(line, getconfig("kinox_url", NULL), 1, 0);
    158164                                                line = ostrcat(line, "/", 1, 0);
    159165                                                line = ostrcat(line, pic, 1, 0);
     
    267273        char* tmpstr4 = NULL, *tmpstr5 = NULL, *line = NULL, *url = NULL, *url2 = NULL, *url3 = NULL, *url4 = NULL, *pathnew = NULL, *extra = NULL;
    268274        char* newurl = NULL;
     275        char* cmd = NULL;
    269276
    270277        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
     
    282289
    283290//      tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
    284         tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     291//      tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     292        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", link, 0, 0);
     293        debug(99, "cmd: %s", cmd);
     294        tmpstr = command(cmd);
     295        free(cmd), cmd = NULL;
     296
    285297        titheklog(debuglevel, "/tmp/kinox2_tmpstr", NULL, NULL, NULL, tmpstr);
    286298       
     
    401413                                                        hlink = string_replace_all("amp;Hoster", "Hoster", hlink, 1);
    402414                                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
    403                                                         pathnewtmp = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0);
     415                                                        pathnewtmp = ostrcat(getconfig("kinox_url", NULL), "/aGET/Mirror/", 0, 0);
    404416                                                        pathnewtmp = ostrcat(pathnewtmp, hlink, 1, 0);
    405417                                                        pathnew = ostrcat(pathnewtmp, NULL, 0, 0);
     
    410422                                                        hlink = ostrcat(hlink, "Mirror=", 0, 0);
    411423                                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
    412                                                         pathnewtmp = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0);
     424                                                        pathnewtmp = ostrcat(getconfig("kinox_url", NULL), "/aGET/Mirror/", 0, 0);
    413425                                                        pathnewtmp = ostrcat(pathnewtmp, hlink, 1, 0);
    414426                                                        pathnew = ostrcat(pathnewtmp, oitoa(j), 0, 1);
     
    427439
    428440//                                              tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
    429                                                 tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     441//                                              tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     442                                                cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     443                                                debug(99, "cmd: %s", cmd);
     444                                                tmpstr1 = command(cmd);
     445                                                free(cmd), cmd = NULL;
    430446
    431447                                                if(ostrstr(tmpstr1, "503 Service Temporarily Unavailable") != NULL)
     
    433449                                                        sleep(1);
    434450//                                                      tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
    435                                                         tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     451//                                                      tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     452                                                        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     453                                                        debug(99, "cmd: %s", cmd);
     454                                                        tmpstr1 = command(cmd);
     455                                                        free(cmd), cmd = NULL;
    436456                                                }
    437457                                                if(ostrstr(tmpstr1, "503 Service Temporarily Unavailable") != NULL)
     
    439459                                                        sleep(1);
    440460//                                                      tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
    441                                                         tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     461//                                                      tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     462                                                        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     463                                                        debug(99, "cmd: %s", cmd);
     464                                                        tmpstr1 = command(cmd);
     465                                                        free(cmd), cmd = NULL;
    442466                                                }
    443467                                                if(ostrstr(tmpstr1, "503 Service Temporarily Unavailable") != NULL)
     
    445469                                                        sleep(1);
    446470//                                                      tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
    447                                                         tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     471//                                                      tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     472                                                        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     473                                                        debug(99, "cmd: %s", cmd);
     474                                                        tmpstr1 = command(cmd);
     475                                                        free(cmd), cmd = NULL;
    448476                                                }
    449477                                                if(ostrstr(tmpstr1, "503 Service Temporarily Unavailable") != NULL)
     
    451479                                                        sleep(1);
    452480//                                                      tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
    453                                                         tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     481//                                                      tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     482                                                        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     483                                                        debug(99, "cmd: %s", cmd);
     484                                                        tmpstr1 = command(cmd);
     485                                                        free(cmd), cmd = NULL;
    454486                                                }
    455487                                                free(pathnew), pathnew = NULL;
     
    756788        char* pichname = NULL, *extra= NULL;
    757789        char* newurl = NULL;
     790        char *cmd = NULL;
    758791
    759792        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
     
    777810
    778811                searchname = string_replace("kinox.to", "", searchname, 0);
    779                 searchname = string_replace(getconfig("tithek_kinox_url", NULL), "", searchname, 0);
     812                searchname = string_replace(getconfig("kinox_url", NULL), "", searchname, 0);
    780813                searchname = string_replace("http:////Stream/", "", searchname, 0);
    781814                searchname = string_replace("http:///Stream/", "", searchname, 0);
     
    802835
    803836//      tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
    804         tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     837//      tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     838        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", link, 0, 0);
     839        debug(99, "cmd: %s", cmd);
     840        tmpstr = command(cmd);
     841        free(cmd), cmd = NULL;
     842
    805843        debug(99, "tmpstr: %s", tmpstr);
    806844
     
    824862       
    825863                free(tmpstr), tmpstr = NULL;
    826 //              tmpstr = gethttp(getconfig("tithek_kinox_url", NULL, pathnew, 80, NULL, NULL, 10000, NULL, 0);
    827                 newurl = ostrcat(getconfig("tithek_kinox_url", NULL), "/", 0, 0);
     864//              tmpstr = gethttp(getconfig("kinox_url", NULL, pathnew, 80, NULL, NULL, 10000, NULL, 0);
     865                newurl = ostrcat(getconfig("kinox_url", NULL), "/", 0, 0);
    828866                newurl = ostrcat(newurl, pathnew, 1, 0);
    829                 tmpstr = gethttps(newurl, NULL, NULL, NULL, NULL, NULL, 1);
     867//              tmpstr = gethttps(newurl, NULL, NULL, NULL, NULL, NULL, 1);
     868
     869                cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", newurl, 0, 0);
     870                debug(99, "cmd: %s", cmd);
     871                tmpstr = command(cmd);
     872                free(cmd), cmd = NULL;
     873
    830874                free(newurl), newurl = NULL;
    831875
     
    884928                                                        hlink = string_replace_all("amp;Hoster", "Hoster", hlink, 1);
    885929                                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
    886                                                         pathnewtmp = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0);
     930                                                        pathnewtmp = ostrcat(getconfig("kinox_url", NULL), "/aGET/Mirror/", 0, 0);
    887931                                                        pathnewtmp = ostrcat(pathnewtmp, hlink, 1, 0);
    888932                                                        pathnew = ostrcat(pathnewtmp, NULL, 0, 0);
     
    893937                                                        hlink = ostrcat(hlink, "Mirror=", 0, 0);
    894938                                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
    895                                                         pathnewtmp = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0);
     939                                                        pathnewtmp = ostrcat(getconfig("kinox_url", NULL), "/aGET/Mirror/", 0, 0);
    896940                                                        pathnewtmp = ostrcat(pathnewtmp, hlink, 1, 0);
    897941                                                        pathnew = ostrcat(pathnewtmp, oitoa(j), 0, 1);
     
    922966
    923967                                                hlink = string_replace("kinox.to", "", hlink, 1);                                       
    924                                                 hlink = string_replace(getconfig("tithek_kinox_url", NULL), "", hlink, 1);                                     
     968                                                hlink = string_replace(getconfig("kinox_url", NULL), "", hlink, 1);                                     
    925969                                                hlink = string_replace("http:////Stream/", "", hlink, 1);                                       
    926970                                                hlink = string_replace("http:///Stream/", "", hlink, 1);
     
    930974//                                              debug(99, "pathnew: %s", pathnew);
    931975//                                              tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
    932                                                 tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     976//                                              tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     977                                                cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     978                                                debug(99, "cmd: %s", cmd);
     979                                                tmpstr1 = command(cmd);
     980                                                free(cmd), cmd = NULL;
    933981//                                              debug(99, "tmpstr1 1: %s", tmpstr1);
    934982
     
    944992                                                {
    945993                                                        free(pathnew), pathnew = NULL;
    946                                                         pathnew = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0);
     994                                                        pathnew = ostrcat(getconfig("kinox_url", NULL), "/aGET/Mirror/", 0, 0);
    947995                                                        pathnew = ostrcat(pathnew, hlink, 1, 0);
    948996//                                                      debug(99, "iframe2.1 pathnew: %s", pathnew);
    949997                                                        free(tmpstr1), tmpstr1 = NULL;
    950                                                         tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     998//                                                      tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1);
     999                                                        cmd = ostrcat("/tmp/localhoster/hoster.sh get http://", pathnew, 0, 0);
     1000                                                        debug(99, "cmd: %s", cmd);
     1001                                                        tmpstr1 = command(cmd);
     1002                                                        free(cmd), cmd = NULL;
     1003
    9511004//                                                      debug(99, "iframe2.2 tmpstr1: %s", tmpstr1);
    9521005                                                        tmpstr1 = string_replace_all("\\", "", tmpstr1, 1);
     
    11151168                                        incount++;
    11161169                                        line = ostrcat(line, name, 1, 0);
    1117                                         line = ostrcat(line, "#https://", 1, 0);
    1118                                         line = ostrcat(line, getconfig("tithek_kinox_url", NULL), 1, 0);
     1170                                        line = ostrcat(line, "#http://", 1, 0);
     1171                                        line = ostrcat(line, getconfig("kinox_url", NULL), 1, 0);
    11191172                                        line = ostrcat(line, "/People/", 1, 0);
    11201173                                        line = ostrcat(line, url, 1, 0);
Note: See TracChangeset for help on using the changeset viewer.