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>
Path-derived season numbers could win over explicit provider metadata during episode refresh, causing episodes to appear in the wrong season. Prefer provider-supplied season numbers in the provider merge phases without letting later backfill merges clobber them.
LoadCultures() in LocalizationManager skipped all iso6392.txt entries
without a two-letter ISO 639-1 code, dropping 302 of 496 languages
including mul (Multiple languages), und (Undetermined), mis (Uncoded
languages), zxx, and many real languages like Achinese, Akkadian, etc.
This caused FindLanguageInfo() to return null for these codes, which
meant:
- ExternalPathParser could not recognize them as valid language codes
in subtitle filenames, so the Language field was never set
- DisplayTitle fell back to the raw code string (e.g. "Mul")
Fix by allowing entries without two-letter codes to be loaded with an
empty TwoLetterISOLanguageName. Also set LocalizedLanguage in
ProbeResultNormalizer for ffprobe-detected streams (the DB repository
path was already handled on master).
* Add underscore and dot as multi-version file separators
Extend IsEligibleForMultiVersion to recognize _ and . as valid
separators between the base movie name and the version suffix.
Common naming patterns like 'Movie_4K.mkv' or 'Movie.UHD.mkv'
are now correctly grouped as alternate versions during library scan.
* Address review: remove comment, add 3D recognition assertions
---------
Co-authored-by: aimarshall615-creator <aimarshall615@gmail.com>