Cannot load .dat files with xbmcgui.Dialog.browse()

In Advanced Emulator Launcher user may need to load a No-Intro DAT file to audit his/her ROMs. No-Intro DAT files downloaded from Dat-O-Matic are XML files but have DAT file extension. I use the following code to load the DAT file:

Code:
# --- Browse for No-Intro file ---
# BUG For some reason *.dat files are not shown on the dialog, but XML files are OK!!!
dialog = xbmcgui.Dialog()
                        
#  >> DOES NOT SHOW .DAT FILES BUT SHOWS .XML FILES
dat_file = dialog.browse(1, 'Select No-Intro XML DAT (XML|DAT)', 'files', '.dat|.xml').decode('utf-8')
                        
# >> SHOWS .DAT and .XML files. .DAT files have a video icon, .XML have a book icon
# dat_file = dialog.browse(1, 'Select No-Intro XML DAT (XML|DAT)', 'files').decode('utf-8')
                        
# >> DOES NOT SHOW .DAT FILES
# dat_file = dialog.browse(1, 'Select No-Intro XML DAT (XML|DAT)', 'files', '.dat').decode('utf-8')
                        
# >> DOES NOT SHOW .DAT NOR .XML files, but shows .ZIP files
# dat_file = dialog.browse(2, 'Select No-Intro XML DAT (XML|DAT)', 'files', '.dat|.xml').decode('utf-8')

if not FileName(dat_file).exists(): return
self.launchers[launcherID]['nointro_xml_file'] = dat_file
kodi_dialog_OK('DAT file successfully added. Audit your ROMs to update No-Intro status.')

I have tried many combinations of arguments and have done many tests (look at the comments in the Python code) but for some reason Kodi refuses to load .dat files unless the file mask optional argument is not specified. DAT files just don’t show up on the file select dialog so cannot be chosen.

Yes… in case you are wondering I made sure there are .dat files in the directory I use for testing. These are the contents of that directory:

Code:
-rwxrwx---+ 1 Wintermute None 1.3M Oct  2 01:17 'Nintendo - Super Nintendo Entertainment System Parent-Clone (20160925-063400).dat'
-rwxrwx---+ 1 Wintermute None 1.3M Oct  2 01:17 'Nintendo - Super Nintendo Entertainment System Parent-Clone (20160925-063400).xml'
-rwxrwx---+ 1 Wintermute None 645K Oct  2 01:19 'Sega - Mega Drive - Genesis Parent-Clone (20160929-205256).dat'
-rwxrwx---+ 1 Wintermute None 645K Oct  2 01:19 'Sega - Mega Drive - Genesis Parent-Clone (20160929-205256).xml'

I’m currently using Krypton Beta 5 but same behavior happened in Jarvis. Anybody has a clue of what is going on? This could be a bug in the C++ Kodi core? I am doing something wrong? Thanks a lot Big Grin