Move the .sub to .idx path normalization outside the burn-in check so
it applies to subtitle embedding as well. ffmpeg requires the .idx file
to read VobSub subtitles.
Add unit tests for GetMapArgs and GetInputArgument covering internal
subs, external SRT, multi-file SRT, multi-stream MKS containers, and
VobSub .sub/.idx path normalization.
Compute the in-file stream index for external subtitles instead of
hardcoding -map 1:0. For single-stream files (SRT/ASS/VTT) the index
is always 0, preserving existing behavior. For multi-stream containers
like MKS, the correct track is selected by counting sibling streams
that share the same Path.
Add unit tests for GetMapArgs covering internal subs, external SRT,
multiple external files, and multi-stream MKS containers.
Allow external subtitle files (SRT, ASS, PGS, etc.) to be muxed into
MKV output containers when the device profile requests Embed delivery.
Previously, the IsExternal guard in GetSubtitleProfile excluded external
subtitles from Embed consideration entirely, forcing them to be served
as separate sidecar files even when the output container supports
embedding.
Changes:
- Extract CanConsiderEmbedSubtitle in StreamBuilder to allow external
subs through when transcoding to MKV
- Add external subtitle file as FFmpeg input (-i) for Embed delivery
- Map external embedded subs from the correct FFmpeg input index
- Fix external audio map index to account for the new subtitle input
- Extract NeedsExternalSubtitleMuxing in EncodingHelper to deduplicate
the external subtitle input check
Fixes#16403
* Add OriginalLanguage as option to PreferredAudioLanguage
* Support for multiple original languages
* Add original audio stream indicator
* Fetch OriginalLanguage from TMDB
* Adapt to EFCore refactor
* Fix PlayDefaultAudioTrack OriginalLanguage behavior
* Fix better PlayDefaultAudioTrack OriginalLanguage behavior
* Add comment to ItemFields
* Improved PlayDefaultAudioTrack behavior
* Add migration for original language
* Use sting.Equals for string comparisons
* Always set dto OriginalLanguage
* Remove OriginalLanguage from ItemFields
---------
Co-authored-by: Lampan-git <lampan-git@users.noreply.github.com>