Changeset 40094 for titan/plugins


Ignore:
Timestamp:
02/25/17 21:51:27 (7 years ago)
Author:
obi
Message:

tithek add yoztube-dl support

File:
1 edited

Legend:

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

    r40088 r40094  
    1212        string_tolower(tmplink);
    1313
     14
    1415        char* cmd = NULL;
    15         cmd = ostrcat("/tmp/localhoster/hoster.sh get \"", url, 0, 0);
     16        cmd = ostrcat("/tmp/localhoster/hoster.sh youtube_dl \"", url, 0, 0);
    1617        cmd = ostrcat(cmd, "\"", 1, 0);
    1718        streamurl = command(cmd);
    1819        streamurl = string_newline(streamurl);
    1920        free(cmd), cmd = NULL;
    20                
     21
     22        if(streamurl == NULL)
     23        {
     24                cmd = ostrcat("/tmp/localhoster/hoster.sh get \"", url, 0, 0);
     25                cmd = ostrcat(cmd, "\"", 1, 0);
     26                streamurl = command(cmd);
     27                streamurl = string_newline(streamurl);
     28                free(cmd), cmd = NULL;
     29        }
     30
    2131        if(streamurl == NULL)
    2232        {
     
    97107                else
    98108                {
    99                         cmd = ostrcat("/tmp/localhoster/hoster.sh get ", url, 0, 0);
     109                        cmd = ostrcat("/tmp/localhoster/hoster.sh youtube_dl ", url, 0, 0);
    100110                        cmd = ostrcat(cmd, "\"", 1, 0);
    101111                        streamurl = command(cmd);
Note: See TracChangeset for help on using the changeset viewer.