[BUG - PMS 1.15 regression] Automatic subtitle selection broken

Hi @anon18523487 ,

Thanks for getting in touch!

I don’t think this bug is Docker related, I just added that tag because it was recommended by the pinned topic in this forum category.

I’ll provide all your requested things as attachments for two files, one that only has an english audio track and one that has both english and german audio tracks.

Screenshots, XML files and logs.zip (1.0 MB)
(I’ve just included “Plex Media Server.log” to reduce the filesize. If you need all the logs, just ask and I’ll upload the full zip file with all of them.)

I’ve analyzed the logs myself a bit and found the following: Here are logs from the english only file:

We’re going to try to auto-select an audio stream for account 1.
Selecting best audio stream for part ID 609 (autoselect: 1 language: de)
We’re going to try to auto-select a subtitle.
Audio Stream: 2923, Subtitle Stream: -1

And here are the logs from the english and german file:

We’re going to try to auto-select an audio stream for account 1.
Selecting best audio stream for part ID 473 (autoselect: 1 language: de)
We’re going to try to auto-select a subtitle.
Selected a foreign audio track: ger
Subtitles: Found a candidate subtitle language [eng] for a foreign film
Audio Stream: 2048, Subtitle Stream: 2052

Note that the second logs show the line “Selected a foreign audio track: ger”. This is wrong, since I selected German as my main audio language. So it seems like the detection if an audio track is foreign or not is broken. If the first would be seen as foreign and the second wouldn’t, everything would work like it should.