Selaa lähdekoodia

Import music from USB drive

Bob Mottram 8 vuotta sitten
vanhempi
commit
94003c9c7e
1 muutettua tiedostoa jossa 16 lisäystä ja 1 poistoa
  1. 16
    1
      src/freedombone-app-koel

+ 16
- 1
src/freedombone-app-koel Näytä tiedosto

194
 }
194
 }
195
 
195
 
196
 function koel_import_from_usb {
196
 function koel_import_from_usb {
197
-    echo -n ''
197
+    clear
198
+    detect_usb_drive
199
+
200
+    if [ ! -b $USB_DRIVE ]; then
201
+        dialog --title $"Import music from USB drive" --msgbox $'No USB drive found' 6 50
202
+        return
203
+    fi
204
+
205
+    backup_mount_drive ${USB_DRIVE} ${MY_USERNAME}
206
+    if [ ! -d $USB_MOUNT/Music ]; then
207
+        dialog --title $"Import music from USB drive" --msgbox $'No Music directory found on USB drive' 6 50
208
+        backup_unmount_drive ${USB_DRIVE}
209
+    fi
210
+    cp -r $USB_MOUNT/Music/* /music
211
+    backup_unmount_drive ${USB_DRIVE}
212
+    dialog --title $"Import music from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
198
 }
213
 }
199
 
214
 
200
 function configure_interactive_koel {
215
 function configure_interactive_koel {