Skip to content
Snippets Groups Projects
Commit 383619b0 authored by Bob Mottram's avatar Bob Mottram
Browse files

koel configuration menu style

parent 4f87aedf
No related branches found
No related tags found
No related merge requests found
...@@ -272,33 +272,26 @@ function format_music_drive { ...@@ -272,33 +272,26 @@ function format_music_drive {
function configure_interactive_koel { function configure_interactive_koel {
W=(1 $"Import music from directory"
2 $"Import music from USB drive"
3 $"Export music to USB drive"
4 $"Format a USB drive for music storage")
while true while true
do do
data=$(mktemp 2>/dev/null) # shellcheck disable=SC2068
dialog --backtitle $"Freedombone Control Panel" \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Koel" --menu $"Choose an operation, or ESC to exit:" 12 60 4 "${W[@]}" 3>&2 2>&1 1>&3)
--title $"Koel" \
--radiolist $"Choose an operation:" 12 70 5 \ if [ ! "$selection" ]; then
1 $"Import music from directory" off \ break
2 $"Import music from USB drive" off \ fi
3 $"Export music to USB drive" off \
4 $"Format a USB drive for music storage" off \ case $selection in
5 $"Exit" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
break;;
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) koel_import_from_directory;; 1) koel_import_from_directory;;
2) koel_import_from_usb;; 2) koel_import_from_usb;;
3) koel_export_to_usb;; 3) koel_export_to_usb;;
4) format_music_drive;; 4) format_music_drive;;
5) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment