Skip to content
qstream-poll-list 511 B
Newer Older
#!/bin/sh

dest=$1
not=$2
if test -z "$not" ; then 
  not="/etc/qstream/iptv/nopoll.cf"
fi
tmp=/tmp/poll.cf.new$$

curl -s http://forskningsnett.uninett.no/tv/playlist.html \
| 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

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