Wrong subtitles shown after download
Bug report
Describe the bug
After downloading subtitle and restarting playback, wrong language subtitle is shown and stored as default.
Expected Behavior
Correct language subtitle should be shown and stored as movie's default
Actual Behavior
Movie file's last internal subtitle is shown and stored as movie's default.
Possible Fix
To Reproduce
Steps to reproduce the behavior:
My Kodi is set to Finnish UI language and primary subtitle language is set to Finnish.
- I start to playback a movie with internal subtitles (.mkv file)
- The movie has several build-in subtitles, but not in Finnish language, so no subtitles are shown
- While the movie is playing, I download correct Finnish subtitles from Opensubtitles with the plugin, .srt file is saved to the movie dir
- Finnish subtitles are now shown correctly
- I stop movie playback
- I restart movie playback
- But now Kodi is showing wrong language internal subtitle from mkv file's own subtitles, not the Finnish one I just downloaded. This appears to be always the movie file's last internal subtitle, no matter what language it is.
- I open Kodi's text menu and select correct Finnish language subtitles and after that it works again and continues to work also after stopping/restarting playback
Debuglog
The debuglog can be found here:
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
-
[ ] Android
-
[ ] iOS
-
[ ] tvOS
-
[x] Linux
-
[ ] OSX
-
[ ] Windows
-
[ ] Windows UWP
-
Operating system version/name: Ubuntu 20.04 server
-
Kodi version: 19RC1
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
It's a issue with the subtitles order:
When a new subtitle is downloaded with the addon it's added at the end of the list, e.g.:
English (1/3)
Spanish (2/3)
Finnish (External) (3/3) <-- new subtitle downloaded and active
The next time the video is played, it will use the subtitle in position 3, but the order of the subtitles has changed (external first, then internal):
Finnish (External) (1/3)
English (2/3)
Spanish (3/3) <-- set as active
I'm trying to modify the scanning order: first internal, then external and at the end any others that may be downloaded.
similar: #17903