catch exceptions thrown at storing media in a db

This commit is contained in:
tibbi 2018-08-07 13:34:01 +02:00
parent a830cc00ce
commit 83def1d288

View file

@ -824,7 +824,10 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
mLatestMediaDateId = getLatestMediaByDateId()
if (!isFromCache) {
val mediaToInsert = (mMedia).filter { it is Medium && it.deletedTS == 0L }.map { it as Medium }
mMediumDao.insertAll(mediaToInsert)
try {
mMediumDao.insertAll(mediaToInsert)
} catch (e: Exception) {
}
}
}