Import music from USB drive

This commit is contained in:
Bob Mottram 2017-05-25 21:35:51 +01:00
parent c60aea3580
commit 94003c9c7e
1 changed files with 16 additions and 1 deletions

View File

@ -194,7 +194,22 @@ function koel_import_from_directory {
}
function koel_import_from_usb {
echo -n ''
clear
detect_usb_drive
if [ ! -b $USB_DRIVE ]; then
dialog --title $"Import music from USB drive" --msgbox $'No USB drive found' 6 50
return
fi
backup_mount_drive ${USB_DRIVE} ${MY_USERNAME}
if [ ! -d $USB_MOUNT/Music ]; then
dialog --title $"Import music from USB drive" --msgbox $'No Music directory found on USB drive' 6 50
backup_unmount_drive ${USB_DRIVE}
fi
cp -r $USB_MOUNT/Music/* /music
backup_unmount_drive ${USB_DRIVE}
dialog --title $"Import music from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
}
function configure_interactive_koel {