catch exceptions thrown at storing media in a db
This commit is contained in:
parent
a830cc00ce
commit
83def1d288
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue