mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
catching an exception at storing path in db
This commit is contained in:
parent
a17d6c5be4
commit
86fe77834c
1 changed files with 4 additions and 1 deletions
|
@ -716,6 +716,9 @@ fun Context.addPathToDB(path: String) {
|
|||
val videoDuration = if (type == TYPE_VIDEOS) path.getVideoDuration() else 0
|
||||
val medium = Medium(null, path.getFilenameFromPath(), path, path.getParentPath(), System.currentTimeMillis(), System.currentTimeMillis(),
|
||||
File(path).length(), type, videoDuration, false, 0L)
|
||||
galleryDB.MediumDao().insert(medium)
|
||||
try {
|
||||
galleryDB.MediumDao().insert(medium)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue