Changeset 36141


Ignore:
Timestamp:
Nov 10, 2015, 1:24:46 AM (5 years ago)
Author:
obi
Message:

tithek tvhost add liveonlinetv hoster

File:
1 edited

Legend:

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

    r36130 r36141  
    2323        host = string_resub("http://", "/", link, 0);
    2424        free(host), host = NULL;
     25
     26        debug(99, "streamurl %s", streamurl);
     27        return streamurl;
     28}
     29
     30char* liveonlinetv(char* link, int incount)
     31{
     32        int debuglevel = getconfigint("debuglevel", NULL);
     33
     34        debug(99, "liveonlinetv(%d) link=%s", incount, link);
     35        char* streamurl = NULL;
     36        char* host = NULL;
     37        char* path = NULL;
     38        char* tmpstr = NULL;
     39
     40        host = string_resub("http://", "/", link, 0);
     41        tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     42        host = string_resub("http://", "/", link, 0);
     43        path = string_replace_all(host, "", link, 0);
     44        path = string_replace_all("http://", "", path, 1);
     45        path = string_replace_all(" ", "%20", path, 1);
     46        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/tvtoast4_tmpstr", oitoa(incount), host, path, tmpstr);
     47
     48        streamurl = string_resub("hls: \"", "\"", tmpstr, 0);
     49        if(streamurl == NULL)
     50                streamurl = string_resub("progressive: \"", "\"", tmpstr, 0);
     51
     52        free(tmpstr), tmpstr = NULL;
     53        free(host), host = NULL;
     54        free(path), path = NULL;
    2555
    2656        debug(99, "streamurl %s", streamurl);
     
    89119                                else if(ostrstr(url, "cricfree.sx") != NULL)
    90120                                        streamurl = cricfree(url, incount);
     121                                else if(ostrstr(url, "liveonlinetv") != NULL)
     122                                        streamurl = liveonlinetv(url, incount);
    91123                                else
    92124                                {
Note: See TracChangeset for help on using the changeset viewer.