dlna configuration menu style
This commit is contained in:
parent
55906ffcd6
commit
5c410c4b34
|
@ -47,29 +47,22 @@ function logging_off_dlna {
|
|||
}
|
||||
|
||||
function configure_interactive_dlna {
|
||||
W=(1 $"Attach a drive containing playable media"
|
||||
2 $"Remove a drive containing playable media")
|
||||
|
||||
while true
|
||||
do
|
||||
data=$(mktemp 2>/dev/null)
|
||||
dialog --backtitle $"Freedombone Control Panel" \
|
||||
--title $"Media Menu" \
|
||||
--radiolist $"Choose an operation:" 13 70 3 \
|
||||
1 $"Attach a drive containing playable media" off \
|
||||
2 $"Remove a drive containing playable media" off \
|
||||
3 $"Exit" on 2> "$data"
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) rm -f "$data"
|
||||
break;;
|
||||
255) rm -f "$data"
|
||||
break;;
|
||||
esac
|
||||
case $(cat "$data") in
|
||||
# shellcheck disable=SC2068
|
||||
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Media Menu" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||
|
||||
if [ ! "$selection" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
case $selection in
|
||||
1) attach-music;;
|
||||
2) remove-music;;
|
||||
3) rm -f "$data"
|
||||
break;;
|
||||
esac
|
||||
rm -f "$data"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue