catching some exceptions thrown at inserting media in db
This commit is contained in:
parent
668df3b8fb
commit
3c8ec82bc7
1 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||
mediaDB.insertAll(curMedia)
|
||||
try {
|
||||
mediaDB.insertAll(curMedia)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue