Browse code

Add files via upload

Funktion display_result braucht Leerzeile vor Klammer zu

Stefan Höhn authored on11/02/2018 18:36:38 • GitHub committed on11/02/2018 18:36:38
Showing1 changed files

... ...
@@ -13,30 +13,30 @@ touch fifo.txt
13 13
 rm mpg123.fifo
14 14
 mkfifo mpg123.fifo
15 15
 
16
-radiostation()        {
16
+radiostation()          {
17 17
                       mpg123 --control --utf8 --title --preload 1 --buffer 768 --smooth $1 > mpg123.fifo 2>&1> /dev/null &
18 18
                       cat mpg123.fifo >>fifo.txt &
19 19
                       result=$(tail -n 30 fifo.txt|grep -a --line-buffered "StreamTitle"| sed -e 's/;.*//' -e 's/.*=//' -e "s/'//g")
20 20
                       display_result "Webradio" 
21 21
                       
22
-                      }
22
+                         }
23 23
 
24
-
25
-display_result() {
26
-                  gdialog --title "$1" \
27
-                  --no-collapse \
28
-                  --stdout \
29
-                  --infobox "$result" 0 0 \
30
-                 }
24
+display_result()         {
25
+                      gdialog --title "$1" \
26
+                              --no-collapse \
27
+                              --stdout \
28
+                              --msgbox "$result" 0 0 \
29
+                              
30
+                         }
31 31
 
32 32
 while true; do
33 33
   exec 3>&1
34 34
   selection=$(gdialog \
35 35
     --backtitle "SmaRPt Webradio" \
36
-    --title "Webradio" \
36
+    --title "Senderliste" \
37 37
     --clear \
38 38
     --cancel-label "Exit" \
39
-    --menu "Senderauswahl:" $HEIGHT $WIDTH 4 \
39
+    --menu "Please select:" $HEIGHT $WIDTH 4 \
40 40
     "1" "Radio1" \
41 41
     "2" "Radio2" \
42 42
     "3" "Radio3" \
... ...
@@ -52,10 +52,10 @@ while true; do
52 52
       ;;
53 53
       $DIALOG_OK)
54 54
       killall mpg123
55
-      ;;
56
-           
55
+       ;;
57 56
     $DIALOG_ESC)
58 57
       clear
58
+   #   echo "Program aborted." >&2
59 59
       killall mpg123
60 60
       exit 1
61 61
       ;;
... ...
@@ -63,7 +63,7 @@ while true; do
63 63
   case $selection in
64 64
     0 )
65 65
       clear
66
-  #    echo "Program terminated."
66
+  
67 67
       killall mpg123
68 68
       ;;
69 69
     1 )
... ...
@@ -73,7 +73,7 @@ while true; do
73 73
    radiostation http://relay.181.fm:8072 
74 74
     ;;
75 75
     3 )
76
-    radiostation http://icyrelay.181.fm/181-blues_128k.mp3
76
+       radiostation http://icyrelay.181.fm/181-blues_128k.mp3
77 77
      ;;
78 78
   esac
79 79
 done