source: titan/mediathek/localhoster/hoster.sh @ 37175

Last change on this file since 37175 was 37175, checked in by obi, 6 years ago

fix localhoster

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4TYPE=$1
5INPUT=$2
6
7ARCH=`cat /etc/.arch`
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
11wgetbin="wget -q -T2"
12TMP=/tmp/localcache
13
14hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
15
16debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
17curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
18if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
19
20ecostream()
21{
22        hosterurl=http://www.ecostream.tv
23        data="tpm=`$curlbin $INPUT | grep footerhash | cut -d"'" -f2``$curlbin $INPUT | grep superslots | cut -d"'" -f2`&id=`$curlbin $INPUT | grep data-id | cut -d'"' -f4`"
24        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
25        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
26        if [ "$streamurl" != "$hosterurl" ];then
27                echo $streamurl
28        fi
29}
30
31if [ "$TYPE" == "get" ];then
32        case $hoster in
33                ecostream) ecostream $INPUT;;
34        esac
35fi
Note: See TracBrowser for help on using the repository browser.