Newer
Older
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