mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
try adding missing media files in the mediastore by scanning it
This commit is contained in:
parent
3a0579c2e8
commit
cd75718d56
1 changed files with 3 additions and 1 deletions
|
@ -270,8 +270,10 @@ class MediaFetcher(val context: Context) {
|
|||
|
||||
val medium = Medium(filename, file.absolutePath, isVideo, dateModified, dateTaken, size)
|
||||
val isAlreadyAdded = curMedia.any { it.path == file.absolutePath }
|
||||
if (!isAlreadyAdded)
|
||||
if (!isAlreadyAdded) {
|
||||
curMedia.add(medium)
|
||||
context.scanPath(file.absolutePath) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue