mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
catching some exceptions at adding media in db
This commit is contained in:
parent
9c7c995251
commit
af96e77313
1 changed files with 9 additions and 6 deletions
|
@ -401,6 +401,7 @@ fun Context.rescanFolderMediaSync(path: String) {
|
||||||
val newMedia = it
|
val newMedia = it
|
||||||
val mediumDao = galleryDB.MediumDao()
|
val mediumDao = galleryDB.MediumDao()
|
||||||
val media = newMedia.filter { it is Medium } as ArrayList<Medium>
|
val media = newMedia.filter { it is Medium } as ArrayList<Medium>
|
||||||
|
try {
|
||||||
mediumDao.insertAll(media)
|
mediumDao.insertAll(media)
|
||||||
|
|
||||||
cached.forEach {
|
cached.forEach {
|
||||||
|
@ -411,6 +412,8 @@ fun Context.rescanFolderMediaSync(path: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.execute()
|
}.execute()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue