try adding missing media files in the mediastore by scanning it

This commit is contained in:
tibbi 2017-10-01 09:16:31 +02:00
parent 3a0579c2e8
commit cd75718d56

View file

@ -270,8 +270,10 @@ class MediaFetcher(val context: Context) {
val medium = Medium(filename, file.absolutePath, isVideo, dateModified, dateTaken, size) val medium = Medium(filename, file.absolutePath, isVideo, dateModified, dateTaken, size)
val isAlreadyAdded = curMedia.any { it.path == file.absolutePath } val isAlreadyAdded = curMedia.any { it.path == file.absolutePath }
if (!isAlreadyAdded) if (!isAlreadyAdded) {
curMedia.add(medium) curMedia.add(medium)
context.scanPath(file.absolutePath) {}
}
} }
} }