Empty groups when loading media groups list
When the Android app loads the MediaGroup lists with videoGroups, some of the groups are sometimes empty.
For now, it makes the app crash on the kotlin side.
private fun Array<VideoGroup>.extractSingles() = map {
if (it.mediaCount() == 1) it.media(Medialibrary.SORT_DEFAULT, false, 1, 0)[0] else it // here
}.toTypedArray()
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
We can workaround that but it would hide a ML issue. The exact same code wasn't crashing before the MediaGroup refactor, so it's a regression between Android app version 3.2 and 3.3.
This crash doesn't seem to be linked to a specific Android version or manufacturer.
I do not have a mail report about this issue and I didn't reproduce that so I don't have a DB file to share unfortunately.
From what I see form the Play Store console, it seems that it happens only once by user so it may be a race condition.
(It happened twice for a user only once)
