catching some exceptions thrown at inserting media in db

This commit is contained in:
tibbi 2020-05-17 11:37:55 +02:00
parent 668df3b8fb
commit 3c8ec82bc7

View file

@ -958,11 +958,14 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
setupAdapter(dirs)
// update directories and media files in the local db, delete invalid items
// update directories and media files in the local db, delete invalid items. Intentionally creating a new thread
updateDBDirectory(directory)
if (!directory.isRecycleBin()) {
Thread {
try {
mediaDB.insertAll(curMedia)
} catch (ignored: Exception) {
}
}.start()
}