catching some exceptions at adding media in db

This commit is contained in:
tibbi 2019-07-28 19:50:15 +02:00
parent 9c7c995251
commit af96e77313

View file

@ -401,6 +401,7 @@ fun Context.rescanFolderMediaSync(path: String) {
val newMedia = it
val mediumDao = galleryDB.MediumDao()
val media = newMedia.filter { it is Medium } as ArrayList<Medium>
try {
mediumDao.insertAll(media)
cached.forEach {
@ -411,6 +412,8 @@ fun Context.rescanFolderMediaSync(path: String) {
}
}
}
} catch (ignored: Exception) {
}
}
}.execute()
}