[Xposed Framework Modules] thomashofmann:
Edit 2:

I made tree XMSO/XMSO_sub1/XMSO_sub2/XMSO_sub3/ to both: internal sdcard and external sdcard, every folder including root has all these files: .scanMedia, .scanMusic, .scanPictures, .scanVideo (this time with capital)

All other .scanX files removed, so these are the only ones in my phone.

Then I deleted MediaStore content --> ran Media Scanner and pulled this log:

XMSO: Searching directories to scan in /storage/emulated/0
XMSO: Marker file exists in directory /storage/emulated/0/XMSO
XMSO: Searching directories to scan in /storage/extSdCard
XMSO: Marker file exists in directory /storage/extSdCard/XMSO
XMSO: The following directories will be scanned by MediaScanner: [/storage/emulated/0/XMSO, /storage/extSdCard/XMSO]
XMSO: createSimpleNotification with title Media Scanner Optimizer, text Scanning /storage/emulated/0/XMSO, subText null
XMSO: The file /storage/emulated/0/XMSO/.scanMedia should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/.scanMusic should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/.scanPictures should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/.scanVideo should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/.scanMedia should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/.scanMusic should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/.scanPictures should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/.scanVideo should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/.scanMedia should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/.scanMusic should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/.scanPictures should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/.scanVideo should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanMedia should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanMusic should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanPictures should not be considered as a media file
XMSO: The file /storage/emulated/0/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanVideo should not be considered as a media file
XMSO: createSimpleNotification with title Media Scanner Optimizer, text Scanning /storage/extSdCard/XMSO, subText null
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanMedia should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanMusic should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanVideo should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/XMDSO_sub3/.scanPictures should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/.scanMedia should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/.scanMusic should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/.scanVideo should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/XMSO_sub2/.scanPictures should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/.scanMedia should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/.scanMusic should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/.scanVideo should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/XMSO_sub1/.scanPictures should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/.scanMedia should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/.scanMusic should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/.scanVideo should not be considered as a media file
XMSO: The file /storage/extSdCard/XMSO/.scanPictures should not be considered as a media file

[/QUOTE]

So it is working like I said, right? You need .scanmedia at a top level folder and everything beneath will be scanned. Which media type will be determined at subdir level.