<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.5">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ffffff">
A titolo informativo .... per evitare di installare robaccia (moonlight/mono) su Linux.<BR>
<BR>
Ciao.<BR>
<BR>
P.S.<BR>
Ci si vede questa sera, sintonizzati sul canale &quot;Hotel La Serra di Ivrea&quot;, ore 19:00<BR>
<BR>
Bye<BR>
<BR>
------- Messaggio inoltrato -------<BR>
<B>Da</B>: MEP &lt;<A HREF="mailto:MEP%20%3cpalazzot@fedoraproject.org%3e">palazzot@fedoraproject.org</A>&gt;<BR>
<B>Reply-to</B>: palazzot@google.com, &quot;Mailing list for Italian contributors and users.&quot; &lt;fedora-it-list@redhat.com&gt;<BR>
<B>A</B>: Mailing list for Italian contributors and users. &lt;<A HREF="mailto:%22Mailing%20list%20for%20Italian%20contributors%20and%20users.%22%20%3cfedora-it-list@redhat.com%3e">fedora-it-list@redhat.com</A>&gt;<BR>
<B>Oggetto</B>: Re: [Fedora-it] Rai tv<BR>
<B>Data</B>: Mon, 07 Sep 2009 21:00:34 +0200<BR>
<BR>
Il 07/09/2009 18:55, antonio montagnani ha scritto: <BR>
<BLOCKQUOTE TYPE=CITE>
    qualcuno &#232; riuscito a far funzionare il plugin moonlight per vedere la rai in diretta??? come si fa?? Io lo installo ma ogni volta mi dice che devo reinstallarlo. <BR>
    Nell'elenco plugin di Firefox esiste un silver light. <BR>
    L'esperienza multimediale con Fedora &#232; frustrante, altro che Linux day... :-( 
<PRE>

<HR SIZE="4">


_______________________________________________
Fedora-it-list mailing list
<A HREF="mailto:Fedora-it-list@redhat.com">Fedora-it-list@redhat.com</A>
<A HREF="https://www.redhat.com/mailman/listinfo/fedora-it-list">https://www.redhat.com/mailman/listinfo/fedora-it-list</A>
</PRE>
</BLOCKQUOTE>
Prova con questo script....<BR>
Ciao,<BR>
&nbsp;&nbsp;&nbsp; MEP<BR>
<BR>
#!/bin/bash<BR>
# Usate, modificate, riscrivete questo script come vi pare.<BR>
# se vi succede qualcosa di brutto a causa di questo script,<BR>
# io non c'ero, e se c'ero dormivo, ergo: sono cavoli vostri. chiaro?<BR>
<BR>
## CONFIGURAZIONE UTENTE<BR>
tries=5&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #tentativi di scaricare ogni file<BR>
timeout=10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #tempo massimo di attesa risposta per lo scaricamento (secondi)<BR>
player=&quot;vlc&quot;&nbsp;&nbsp;&nbsp; #nome del player video.<BR>
output=&quot;si&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #mandare a video i messaggi del player? (si/no)<BR>
background=&quot;no&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #mandare il player in background, in modo da aver disponibile il terminale?<BR>
<BR>
#per salvare gli stream, usate il vostro player preferito.<BR>
#per mplayer ad esempio, basta modificare la variabile &quot;player&quot; a:<BR>
# player=&quot;mplayer -dumpfile stream.wmv -dumpstream&quot;<BR>
<BR>
############ PROGRAMMA REALE ################<BR>
############ NON MODIFICARE! ################<BR>
NOTFOUND=&quot;&quot;<BR>
for command in wget sed grep awk tail head dialog; do<BR>
&nbsp;&nbsp;&nbsp; if [ -z &quot;`which $command 2&gt;/dev/null`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NOTFOUND=&quot;`echo &quot;$NOTFOUND $command&quot;`&quot;<BR>
&nbsp;&nbsp;&nbsp; fi<BR>
done<BR>
if [ -n &quot;$NOTFOUND&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; echo &quot;Comandi non trovati:&quot;<BR>
&nbsp;&nbsp;&nbsp; echo $NOTFOUND<BR>
&nbsp;&nbsp;&nbsp; exit 1<BR>
fi<BR>
USERAGENT='Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.11'<BR>
PLAYERCMD=&quot;`echo $player|awk -F &quot; &quot; '{print $1}'`&quot;<BR>
if [ -z &quot;`which $PLAYERCMD 2&gt;/dev/null`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; echo &quot;Player $PLAYERCMD non trovato!&quot;<BR>
&nbsp;&nbsp;&nbsp; exit 1<BR>
fi<BR>
unset PLAYERCMD<BR>
case $output in<BR>
&nbsp;&nbsp;&nbsp; [Ss][Ii])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; [Nn][Oo])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; *)<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;La variabile \&quot;output\&quot; ammette solo&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;I valori \&quot;si\&quot; e \&quot;no\&quot;&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit 1<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
esac<BR>
case $background in<BR>
&nbsp;&nbsp;&nbsp; [Ss][Ii])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; [Nn][Oo])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; *)<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;La variabile \&quot;background\&quot; ammette solo&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;I valori \&quot;si\&quot; e \&quot;no\&quot;&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit 1<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
esac<BR>
help () {<BR>
&nbsp;&nbsp;&nbsp; echo &quot;Script per la visualizzazione dei canali presenti su rai.tv&quot;<BR>
&nbsp;&nbsp;&nbsp; echo &quot;senza il plugin Silverlight di Microsoft o Moonlight di Novell&quot;<BR>
&nbsp;&nbsp;&nbsp; echo &quot;Creato da Luke88 -- luke88 _at_ slacky.it&quot;<BR>
&nbsp;&nbsp;&nbsp; echo -e &quot;\nUso:\t$0 chiave_ricerca\tcerca canale nella lista&quot;<BR>
&nbsp;&nbsp;&nbsp; echo -e &quot;\t$0 tutti\t\tlista completa dei canali&quot;<BR>
&nbsp;&nbsp;&nbsp; echo &quot;&quot;<BR>
&nbsp;&nbsp;&nbsp; echo &quot;per configurare player e comportamenti del player&quot;<BR>
&nbsp;&nbsp;&nbsp; echo &quot;cambiare le variabili all'inizio di questo scirpt&quot;<BR>
&nbsp;&nbsp;&nbsp; echo &quot;con il vostro editor preferito&quot;<BR>
&nbsp;&nbsp;&nbsp; echo -e &quot;\nlo script non porta con se garanzie di qualsiasi tipo&quot;<BR>
}<BR>
update () {<BR>
&nbsp;&nbsp;&nbsp; echo &quot;scarico la lista dei canali....&quot;<BR>
&nbsp;&nbsp;&nbsp; rm ${0}.xml &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; wget -U &quot;$USERAGENT&quot; --tries=$tries --timeout=$timeout -O ${0}.xml --tries=$tries <A HREF="http://www.rai.tv/dl/RaiTV/videoWall/PublishingBlock-5566288c-3d21-48dc-b3e2-af7fbe3b2af8.xml">www.rai.tv/dl/RaiTV/videoWall/PublishingBlock-5566288c-3d21-48dc-b3e2-af7fbe3b2af8.xml</A> &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; if [ ! -s ${0}.xml ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;Download fallito! controlla la connessione internet e rilancia il programma&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit 1<BR>
&nbsp;&nbsp;&nbsp; fi<BR>
&nbsp;&nbsp;&nbsp; rm ${0}.tmp &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; grep -B 1 '&lt;url&gt;' ${0}.xml|sed /--/d | sed s/^\ *// &gt; ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; rm ${0}.xml &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; sed -i s/\&amp;apos\;/\'/g ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#224\;/&#224;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#225\;/&#224;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#232\;/&#232;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#233\;/&#233;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#236\;/&#236;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#237\;/&#236;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#242\;/&#242;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#242\;/&#242;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i 's/\&amp;#249\;/&#249;/g' ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; sed -i s/\&amp;amp\;/\\\&amp;/g ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; COUNTER=0<BR>
&nbsp;&nbsp;&nbsp; rm ${0}.canali &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; while read line ; do<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; let &quot;NUM=$COUNTER % 2&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ $NUM -eq 0 ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; let &quot;NUM=$COUNTER % 20&quot;&nbsp;&nbsp;&nbsp; #facciamo vedere qualcosa a schermo...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ $NUM -eq 0 ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; let &quot;NUM=$COUNTER/2&quot;&nbsp;&nbsp;&nbsp; #ogni 10 stream diciamo a quanti siamo...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo -n $NUM<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo -n &quot;.&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fi<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo -en $line|awk -F '&quot;' '{print $2}' &gt;&gt; ${0}.canali&nbsp;&nbsp;&nbsp; #metti il nome dello stream in cache<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo -en $line|awk -F '&lt;url&gt;' '{print $2}'|awk -F '&lt;/url&gt;' '{print $1}' &gt;&gt; ${0}.canali&nbsp;&nbsp;&nbsp; #metti l'indirizzo dello stream in cache<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;==&quot; &gt;&gt; ${0}.canali&nbsp;&nbsp;&nbsp; #non &#232; realmente necessario, ma se qualcuno si vuole vedere la lista selza usare lo script<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fi&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #fa comodo avere una lista leggibile<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; let COUNTER++<BR>
&nbsp;&nbsp;&nbsp; done &lt; ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; echo &quot;&quot;<BR>
&nbsp;&nbsp;&nbsp; rm ${0}.tmp &amp;&gt;/dev/null<BR>
}<BR>
check_dwn () {<BR>
&nbsp;&nbsp;&nbsp; if [ ! -s ${0}.tmp ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;Download fallito! controlla la connessione internet e rilancia il programma&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit 1<BR>
&nbsp;&nbsp;&nbsp; fi<BR>
}<BR>
play () {<BR>
&nbsp;&nbsp;&nbsp; if [ -z &quot;`echo $STREAM|grep '<A HREF="mms://">mms://</A>'`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #uff... tiriamo fuori lo stream da incasinamenti vari....<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rm ${0}.tmp &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wget -U &quot;$USERAGENT&quot; --tries=$tries --timeout=$timeout --spider&nbsp; &quot;$STREAM&quot; -O /dev/null 1&gt; /dev/null 2&gt; ${0}.tmp&nbsp;&nbsp;&nbsp; #a volte il link &#232; un file flv.<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; check_dwn<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TMP=&quot;`tail -n 2 ${0}.tmp|grep 'flv'`&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #che sembra essere solo un video....<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rm ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -z &quot;$TMP&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wget -U &quot;$USERAGENT&quot; --tries=$tries --timeout=$timeout -O ${0}.tmp &quot;$STREAM&quot; &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; check_dwn<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -z &quot;`grep '<A HREF="http://">http://</A>' ${0}.tmp`&quot; ]&amp;&amp;[ -z &quot;`grep '<A HREF="mms://">mms://</A>' ${0}.tmp`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #mi &#232; capitato che alcuni link portino nel vuoto<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;(muove la mano)--Tu *NON* vuoi vedere questo canale&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rm ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit 1<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -n &quot;`grep '<A HREF="mms://">mms://</A>' ${0}.tmp`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STREAM=&quot;`grep '<A HREF="mms://">mms://</A>' ${0}.tmp|awk -F '&quot;' '{print $4}'`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; elif [ -n &quot;`grep wmv ${0}.tmp`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STREAM=&quot;`grep wmv ${0}.tmp |awk -F '&quot;' '{print $2}'`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STREAM=&quot;`grep '<A HREF="http://">http://</A>' ${0}.tmp`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -n &quot;`echo $STREAM|grep 'HREF'`&quot; ]; then<BR>
&nbsp;&nbs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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rm ${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wget -U &quot;$USERAGENT&quot; --tries=$tries --timeout=$timeout --spider &quot;$STREAM&quot; -O /dev/null 1&gt;/dev/null 2&gt;${0}.tmp<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; check_dwn<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -z &quot;`tail -n 2 ${0}.tmp|grep 'flv'`&quot; ]; then&nbsp;&nbsp;&nbsp; #se NON &#232; un flv...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wget -U &quot;$USERAGENT&quot; --tries=$tries --timeout=$timeout -O ${0}.tmp &quot;$STREAM&quot; &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; check_dwn<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -n &quot;`grep '<A HREF="mms://">mms://</A>' ${0}.tmp`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STREAM=&quot;`grep '<A HREF="mms://">mms://</A>' ${0}.tmp&nbsp; |awk -F '&quot;' '{print $2}'`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; elif [ -n &quot;`grep '.flv' ${0}.tmp`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STREAM=&quot;`cat ${0}.tmp`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; elif [ -n &quot;`grep '.wmv' ${0}.tmp`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STREAM=&quot;`grep '.wmv' ${0}.tmp |awk -F '&quot;' '{print $2}'`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp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nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $player &quot;$STREAM&quot; &amp;&gt;/dev/null &amp;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; esac<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [Ss][Ii])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case $background in<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [Nn][Oo])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $player &quot;$STREAM&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [Ss][Ii])<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $player &quot;$STREAM&quot; &amp;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; esac<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; esac<BR>
}<BR>
if [ &quot;$1&quot; == &quot;-h&quot; ]||[ &quot;$1&quot; == &quot;--h&quot; ]||[ &quot;$1&quot; == &quot;-help&quot; ]||[ &quot;$1&quot; == &quot;--help&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; help<BR>
&nbsp;&nbsp;&nbsp; exit 0<BR>
fi<BR>
update<BR>
COUNTER=1<BR>
#costruiamo la lista variabili per il dialog.<BR>
#&#232; una lista di elementi, del tipo<BR>
#nome1 &quot;&quot; help1 nome2 &quot;&quot; help2 ...<BR>
#il secondo elemento &#232; volontariamente lasciato come lista vuota.<BR>
rm ${0}.list &amp;&gt;/dev/null<BR>
if [ &quot;$1&quot; == &quot;tutti&quot; ]||[ -z &quot;$1&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; grep -v ^==$ ${0}.canali | \<BR>
&nbsp;&nbsp;&nbsp; while read line; do<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &quot;$COUNTER&quot; in<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 1 )<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo \&quot;$line\&quot; &gt;&gt; ${0}.list&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #&quot;# &lt;--ripristino la colorazione per vim...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COUNTER=2<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 2)<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo -e \&quot;\&quot;&quot;\n&quot;\&quot;$line\&quot; &gt;&gt; ${0}.list&nbsp;&nbsp;&nbsp; #&quot;# &lt;--ripristino la colorazione per vim...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COUNTER=1<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; esac<BR>
&nbsp;&nbsp;&nbsp; done<BR>
else<BR>
&nbsp;&nbsp;&nbsp; grep -A 1 -i &quot;$1&quot; ${0}.canali | grep -v -- ^--$ | grep -v ^==$ |\<BR>
&nbsp;&nbsp;&nbsp; while read line ; do<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &quot;$COUNTER&quot; in<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0 )<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COUNTER=1 #serve solo per 'saltare un turno'<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 1 )<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -z &quot;`echo $line|grep '://'`&quot; ]; then&nbsp;&nbsp;&nbsp; # se non &#232; un url<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo \&quot;$line\&quot; &gt;&gt; ${0}.list&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #&quot;# &lt;--ripristino la colorazione per vim...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COUNTER=2<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #abbiamo greppato l'indirizzo... non ce ne facciamo niente...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COUNTER=0<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fi<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 2 )<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo \&quot;\&quot; &gt;&gt; ${0}.list&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #&quot;#<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo \&quot;$line\&quot; &gt;&gt; ${0}.list&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #&quot;# &lt;--ripristino la colorazione per vim...<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COUNTER=1<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; esac<BR>
&nbsp;&nbsp;&nbsp; done<BR>
fi<BR>
if [ ! -s ${0}.list ]; then<BR>
&nbsp;&nbsp;&nbsp; echo &quot;Canale non trovato...&quot;<BR>
&nbsp;&nbsp;&nbsp; exit 0<BR>
fi<BR>
rm ${0}.reply &amp;&gt;/dev/null<BR>
REPLY=&quot;&quot;<BR>
while [ -z &quot;$REPLY&quot; ]; do<BR>
&nbsp;&nbsp;&nbsp; dialog --title &quot;Stream disponibili&quot; --help-button --item-help --menu &quot;scegli lo stream da aprire&quot; 20 70 12 --file ${0}.list 2&gt; ${0}.reply<BR>
&nbsp;&nbsp;&nbsp; REPLY=&quot;`tail -n 1 ${0}.reply`&quot;<BR>
&nbsp;&nbsp;&nbsp; rm ${0}.reply &amp;&gt;/dev/null <BR>
&nbsp;&nbsp;&nbsp; if [ -n &quot;`echo $REPLY|grep '^HELP '`&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; REPLY=&quot;`echo $REPLY|awk -F &quot;HELP &quot; '{print $2}'`&quot; &nbsp;&nbsp;&nbsp; #&quot;`&quot;# &lt;&lt;-ripristino colorazione vim....<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME=&quot;`grep -B 2 &quot;$REPLY&quot; ${0}.list|head -n 1`&quot;<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dialog --title &quot;$NAME&quot; --msgbox &quot;Lo stream &#232; all'indirizzo:\n$REPLY&quot; 20 70<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; REPLY=&quot;&quot;<BR>
&nbsp;&nbsp;&nbsp; elif [ -z &quot;$REPLY&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rm ${0}.list &amp;&gt;/dev/null<BR>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<BR>
&nbsp;&nbsp;&nbsp; fi<BR>
done<BR>
clear<BR>
if [ &quot;$REPLY&quot; == &quot;&quot; ]; then<BR>
&nbsp;&nbsp;&nbsp; echo &quot;Nessuno stream trovato per questa ricerca&quot;<BR>
&nbsp;&nbsp;&nbsp; exit 0<BR>
fi<BR>
STREAM=&quot;`grep -A 2 &quot;$REPLY&quot; ${0}.list|tail -n 1|awk -F '&quot;' '{print $2}'`&quot;<BR>
rm ${0}.list &amp;&gt;/dev/null<BR>
play<BR>
echo &quot;&quot;<BR>
<BR>
<BR>
<PRE>
_______________________________________________
Fedora-it-list mailing list
<A HREF="mailto:Fedora-it-list@redhat.com">Fedora-it-list@redhat.com</A>
<A HREF="https://www.redhat.com/mailman/listinfo/fedora-it-list">https://www.redhat.com/mailman/listinfo/fedora-it-list</A>
</PRE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Dario Lesca &lt;<A HREF="mailto:d.lesca@solinos.it">d.lesca@solinos.it</A>&gt;
</TD>
</TR>
</TABLE>
</BODY>
</HTML>