Prompting user to enable/disable auto-indexing into media library
Auto-indexing of files and directories into the media library is a feature with several potentially problematic aspects:
- reliability, as automatically preparsing a huge number of files is more likely to trigger a crash in one of them, that could be less than obvious to diagnose and isolate;
- security, as it greatly increases the attack surface without requiring user interaction;
- privacy, as some users don't want applications, even trusted, to start tracking files that they don't own without being told to (I'm certainly one of those users);
- performance, obviously.
There are efforts, such as #25119, to implement strategies to mitigate the above. On top of that, or in case it falls short, we might also want to consider the possibility of prompting the user clearly, for example in a first-run dialog, when first opening the media library, or as a media library control, to choose whether they want auto-indexing enabled or not.
And regardless of whether and how it would be prominently advertised in the interface, we probably also want this preference setting just for its usefulness as a tool to diagnose or mitigate various situations.