sweyer
sweyer copied to clipboard
Create option to ignore certain folders when scanning for local music
When first launched the app scans filesystem for music. 90% of mp3 files on my phone are automatic call recordings. I wish it was possible to exclude some folders, manually or, even better, automatically.
For example, on my phone recordings are stored in /MIUI/sound_recorder
About your problem - I think there's something off with the system data about these files. The app checks for IS_MUSIC flag on the files, so it should really only display files that are marked as music. Perhaps the dialer you are using is not marking them correctly.
Can you check if other apps that display local songs have this problem too? For example YT music or Oto music.
The feature of excluding individual folders seems marginally useful. My intention with this app is to keep it simple, and I wouldn't really like to build a filesystem navigator or something like this - I want the app to display the data the system provides (MediaStore to be precise).
This is also probably not possible to do on Android 11 and above, because of the scoped storage. In these versions the app doesn't even know the actual path of the files.
Can you check if other apps that display local songs have this problem too? For example YT music or Oto music.
Installed YT Music and entered local data mode, it was painfully long, but it did in fact show seemingly every call recording. It was much slower than your app during scanning.
If you come up with a fix or workaround, I could check it. I'm using preinstalled Xiaomi MIUI dialer on MIUI 12.0.2.
It's always a mess with Xiaomis.
I haven't tested anything, but if there are no actual music files in the folder, you could create a .nomedia file in the /MIUI/sound_recorder directory. The content of the file doesn't matter, only the name is important (make sure it's not .nomedia.txt). This will cause the MediaStore to ignore any new audio files there.
Unfortunately, it's probably not going to ignore the existing ones though, but you could try two things:
- Temporarily rename the
/MIUI/sound_recorderdirectory to something else, this should trigger a MediaStore re-scan and the files should disappear from Sweyer (if not, maybe try rebooting). Afterwards, rename the folder to the original name. - Try to find the MediaStore app in the device settings and delete it's data (see this tutorial).