Export music to usb
This commit is contained in:
parent
5c446645aa
commit
597228ef89
|
@ -212,6 +212,24 @@ function koel_import_from_usb {
|
||||||
dialog --title $"Import music from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
|
dialog --title $"Import music from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function koel_export_to_usb {
|
||||||
|
clear
|
||||||
|
detect_usb_drive
|
||||||
|
|
||||||
|
if [ ! -b $USB_DRIVE ]; then
|
||||||
|
dialog --title $"Export music to USB drive" --msgbox $'No USB drive found' 6 50
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
backup_mount_drive ${USB_DRIVE} ${MY_USERNAME}
|
||||||
|
if [ ! -d $USB_MOUNT/Music ]; then
|
||||||
|
mkdir -p $USB_MOUNT/Music
|
||||||
|
fi
|
||||||
|
cp -ru /music/* $USB_MOUNT/Music
|
||||||
|
backup_unmount_drive ${USB_DRIVE}
|
||||||
|
dialog --title $"Export music to USB drive" --msgbox $'Export complete. You may now remove the USB drive' 6 50
|
||||||
|
}
|
||||||
|
|
||||||
function configure_interactive_koel {
|
function configure_interactive_koel {
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
@ -219,10 +237,11 @@ function configure_interactive_koel {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title $"Koel" \
|
--title $"Koel" \
|
||||||
--radiolist $"Choose an operation:" 13 70 3 \
|
--radiolist $"Choose an operation:" 14 70 4 \
|
||||||
1 $"Import music from directory" off \
|
1 $"Import music from directory" off \
|
||||||
2 $"Import music from USB drive" off \
|
2 $"Import music from USB drive" off \
|
||||||
3 $"Exit" on 2> $data
|
3 $"Export music to USB drive" off \
|
||||||
|
4 $"Exit" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) break;;
|
1) break;;
|
||||||
|
@ -231,7 +250,8 @@ function configure_interactive_koel {
|
||||||
case $(cat $data) in
|
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) break;;
|
3) koel_export_to_usb;;
|
||||||
|
4) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue