Skip to content

Only trigger media scanner for media files #4999

@grote

Description

@grote

There's several places in the app where triggerMediaScan() is called. This happens irrespective of the mimeType which is available in some of these places.

For huge non-media files, this can slow down the system significantly and even crash with OOM errors. Furthermore when writing these files with a DocumentsProvider, maybe the user doesn't want these files get indexed by the media scanner?

Anyway, a simple fix would be to check the mimetype for media files and only trigger a scan for those.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions