Wrong language subtitles shown - finally figured out why

I’m watching a TV show and each episode it just switches to a random language instead of picking up the one I set in the language preferences. I keep fixing it and then on the next episode, I get a new language…

I finally figured it out.

This happens in a very specific case: the subtitles are internal (no SRT), the order of the languages changes between the episodes.

So, I pick “Hebrew” in Episode 9, it’s the 10th language on the list. On Episode 10, the 10th language on the list is French, so it shows me the French subtitles, instead of trying to match the language to what I have in settings.

There’s an assumption that all the episodes came from the same location and so they must have their languages with the same list and the same order (sounds reasonable, but apparently, that’s not the case).

This bug drives me nuts…