qstream-poll-list 511 Bytes
Newer Older
1 2 3
#!/bin/sh

dest=$1
4 5 6 7
not=$2
if test -z "$not" ; then 
  not="/etc/qstream/iptv/nopoll.cf"
fi
8 9 10
tmp=/tmp/poll.cf.new$$

curl -s http://forskningsnett.uninett.no/tv/playlist.html \
11
| perl -ne 'if(/^#EXTINF:.*,(.*)/){$n=$1; $n=~tr//aoaAOA/;$n=~s/[^\w+-]/_/g} elsif (/^\w/){chomp;if(/239.1.1/){$op="Snap"} elsif (/233.155.107/){$op="TV2"} else{$op="Div"};printf "%s_%s;%s;-mpeg\n", $op, $n, $_}' | grep -v -f $not > $tmp
12 13

if  test -s $tmp; then
Olav Kvittem's avatar
Olav Kvittem committed
14
#    ci -q -l -mauto /etc/qstream/iptv/poll.cf
15 16
    mv $tmp $dest
fi