Changeset 42920 for titan/mediathek


Ignore:
Timestamp:
Oct 17, 2018, 11:06:59 PM (14 months ago)
Author:
obi
Message:

tithek thevideo add not found msg

File:
1 edited

Legend:

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

    r42919 r42920  
    194194
    195195        videocode=`cat $TMP/cache.$FILENAME.1`
    196 
    197196        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
    198197
     
    205204        cat $TMP/cache.$FILENAME.2 | sed 's/{/\n/g' | sed 's/,/\n/g' | grep "/stream/" >$TMP/cache.$FILENAME.3
    206205
    207         while read -u 3 ROUND; do
    208                 TITEL=`echo $ROUND | cut -d'"' -f2`
    209                 URL=`echo $ROUND | cut -d'"' -f4`
    210 
    211                 if [ ! -z "$URL" ];then
    212                         echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
    213                         echo "" >> $STREAMLIST
    214                 fi
    215 
    216 
    217         done 3<$TMP/cache.$FILENAME.3
    218         rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
    219         echo $STREAMLIST
     206        #{"code":400,"message":"invalid video specified","errors":[]}
     207        if [ `cat $TMP/cache.$FILENAME.2 | grep '"code":400,' | wc -l` -eq 1 ];then
     208                ERROR=`cat $TMP/cache.$FILENAME.2 | sed -nr 's/.*"message":"([^"]+)".*/\1/p'`
     209                echo "errormsg=$ERROR"
     210        else
     211                while read -u 3 ROUND; do
     212                        TITEL=`echo $ROUND | cut -d'"' -f2`
     213                        URL=`echo $ROUND | cut -d'"' -f4`
     214
     215                        if [ ! -z "$URL" ];then
     216                                echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
     217                                echo "" >> $STREAMLIST
     218                        fi
     219
     220
     221                done 3<$TMP/cache.$FILENAME.3
     222                rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
     223                echo $STREAMLIST
     224        fi
    220225}
    221226
Note: See TracChangeset for help on using the changeset viewer.