Changeset 37148


Ignore:
Timestamp:
Feb 15, 2016, 1:05:28 AM (5 years ago)
Author:
obi
Message:

enable local hoster

Location:
titan
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/hoster.sh

    r37147 r37148  
    1 ecostream($link)
     1#!/bin/sh
     2# first sh box hoster for titannit mfg obi
     3
     4INPUT=$1
     5
     6hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
     7
     8debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
     9curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
     10if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
     11
     12ecostream()
    213{
    3         debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
    4         curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
    5         if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
    614        hosterurl=http://www.ecostream.tv
    7        
    8         data="tpm=`$curlbin $link | grep footerhash | cut -d"'" -f2``$curlbin $link | grep superslots | cut -d"'" -f2`&id=`$curlbin $link | grep data-id | cut -d'"' -f4`"
     15        data="tpm=`$curlbin $1 | grep footerhash | cut -d"'" -f2``$curlbin $1 | grep superslots | cut -d"'" -f2`&id=`$curlbin $1 | grep data-id | cut -d'"' -f4`"
    916        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
    10         streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $src $hosterurl/$streampage | cut -d'"' -f6`
     17        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $1 $hosterurl/$streampage | cut -d'"' -f6`
    1118        if [ "$streamurl" != "$hosterurl" ];then
    1219                echo $streamurl
    13         else
    14                 echo NULL
    1520        fi
    1621}
     22
     23case $hoster in
     24        ecostream) ecostream $1;;
     25esac
     26
     27exit
  • titan/plugins/tithek/tithek_global.h

    r37146 r37148  
    630630        if(ostrcmp("http://atemio.dyndns.tv/mediathek/mainmenu.list", titheklink) == 0)
    631631        {
    632                 path = createpluginpath("/tithek", 0);
    633                 path = ostrcat(path, "/parser", 1, 0);
    634 
     632//              path = createpluginpath("/tithek", 0);
     633//              path = ostrcat(path, "/parser", 1, 0);
     634                path = ostrcat("/tmp/localparser", 0, 0);
     635
     636                if(!file_exist("/tmp/hoster"))
     637                        mkdir("/tmp/hoster", 0777);
    635638                if(!file_exist("/mnt/parser"))
    636639                        mkdir("/mnt/parser", 0777);
     
    654657                }
    655658
     659                unlink("/tmp/hoster.tar");
     660                gethttp("atemio.dyndns.tv", "/mediathek/hoster.tar", 80, "/tmp/hoster.tar", HTTPAUTH, 5000, NULL, 0);
     661                cmd = ostrcat("tar -xvf /tmp/hoster.tar -C ", "/tmp/hoster", 0, 0);
     662                system(cmd);
     663                free(cmd), cmd = NULL;
     664
    656665                cmd = ostrcat("chmod -R 755 ", path, 0, 0);
    657666                system(cmd);
    658667                free(cmd), cmd = NULL;
    659668
    660                 cmd = ostrcat("chmod -R 755 /tmp/parser", NULL, 0, 0);
     669                cmd = ostrcat("chmod -R 755 /tmp/hoster", NULL, 0, 0);
    661670                system(cmd);
    662671                free(cmd), cmd = NULL;
Note: See TracChangeset for help on using the changeset viewer.