Changeset 29989


Ignore:
Timestamp:
09/19/14 14:56:33 (10 years ago)
Author:
obi
Message:

[tithek] fix firedrive hoster

File:
1 edited

Legend:

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

    r29546 r29989  
    7373                goto end;
    7474        }
    75 printf("111\n");
     75
    7676        srvid = string_resub("SRVID=", ";", tmpstr, 0);
    7777        cauth = string_resub("cauth=", ";", tmpstr, 0);
    7878        cfduid = string_resub("__cfduid=", ";", tmpstr, 0);
    7979        confirm = string_resub("name=\"confirm\" value=\"", "\"", tmpstr, 0);
    80 printf("222\n");
    8180
    8281        if(confirm == NULL) goto end;
    83 printf("333\n");
    8482
    8583        hashstr = htmlencode(confirm);
    86         hashstr = string_replace_all("/", "%5C", hashstr, 1);
     84        hashstr = string_replace_all("/", "%2F", hashstr, 1);
    8785
    8886        hash = ostrcat(hash, "confirm=", 1, 0);
     
    9088        debug(99, "hash: %s", hash);
    9189
    92 printf("444\n");
    9390        if(hash == NULL) goto end;
    9491
    9592        hashlen = oitoa(strlen(hash));
    9693        debug(99, "hashlen: %s", hashlen);
    97 printf("555\n");
    9894
    9995        //create send string
     
    114110        send = ostrcat(send, hash, 1, 0);
    115111        debug(99, "send: %s", send);
    116 printf("666\n");
    117112
    118         waitmsgbar(16, 0, _("Connect with Hoster wait 16 seconds"), 1);
    119 printf("777\n");
     113//      waitmsgbar(16, 0, _("Connect with Hoster wait 16 seconds"), 1);
    120114
    121115        tmpstr = gethttpreal(tmphost, tmppath, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1);
     
    123117        debug(99, "tmpstr: %s", tmpstr);
    124118        titheklog(debuglevel, "/tmp/firedrive2_tmpstr_post", NULL, NULL, NULL, tmpstr);
    125 printf("888\n");
    126119
    127120        if(tmpstr == NULL)
     
    136129                goto end;
    137130        }
    138 printf("999\n");
    139131       
    140132        if(ostrstr(tmpstr, "warning_message") != NULL)
     
    147139                goto end;
    148140        }
    149 printf("aaa\n");
    150141
    151142        streamlink = string_resub("file: '", "'", tmpstr, 0);
    152143        titheklog(debuglevel, "/tmp/firedrive4_streamlink", NULL, NULL, NULL, streamlink1);
    153 printf("bbb\n");
     144
     145        if(streamlink == NULL)
     146        {
     147                streamlink = string_resub("file: loadURL('", "'", tmpstr, 0);
     148                titheklog(debuglevel, "/tmp/firedrive4_streamlink", NULL, NULL, NULL, streamlink1);
     149        }
     150
     151        if(streamlink == NULL)
     152        {
     153                streamlink = string_resub("create_PRO_Modal('", "'", tmpstr, 0);
     154                titheklog(debuglevel, "/tmp/firedrive4_streamlink", NULL, NULL, NULL, streamlink1);
     155        }
    154156
    155157        free(tmpstr); tmpstr = NULL;
    156 printf("ccc\n");
    157158
    158159end:
Note: See TracChangeset for help on using the changeset viewer.