Commit Graph

3314 Commits

Author SHA1 Message Date
Piotr Niełacny 2a689f268b Embed external subtitles into MKV when transcoding
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
2026-05-19 13:03:07 +02:00
Bond-009 c4a21cb322 Merge pull request #16853 from jtvhd6/fix/ca1819-channel-features
Fix CA1819 warnings in ChannelFeatures by using IReadOnlyList
2026-05-15 22:57:36 +02:00
Bond-009 9d420271ad Merge pull request #9787 from TheMelmacian/feature/language_filters
New filters for audio and subtitle languages
2026-05-15 15:44:22 +02:00
TheMelmacian fae4950ac2 Apply suggestions from code review
Co-authored-by: Bond-009 <bond.009@outlook.com>
2026-05-15 12:00:00 +02:00
Bond-009 8e602f982f Merge pull request #15970 from Shadowghost/similarity
Implement similarity providers
2026-05-15 10:00:53 +02:00
Joseph Vallas 6fdb423bfb Fix CA1819 warnings in ChannelFeatures by using IReadOnlyList 2026-05-14 19:43:58 -05:00
Shadowghost 4be3f5f1f9 Add Accept-Language header support for per-request localization 2026-05-12 23:18:38 +02:00
TheMelmacian 39049a726e move language filters from QueryFiltersLegacy to QueryFilters 2026-05-12 02:12:14 +02:00
TheMelmacian 2b7f641163 feat: language filters for subtitles and audio 2026-05-10 12:41:57 +02:00
nyanmisaka 5cb6ac521a Add videoRotation profile condition
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2026-05-09 15:20:29 +08:00
Bond-009 de64a69c7a Merge pull request #14847 from tjwalkr3/warnings-5
Fix CA1051 and CA1815 warnings, Change public fields to auto properties
2026-05-08 17:55:25 +02:00
Erik W e1e18e8da0 Add OriginalLanguage as option to PreferredAudioLanguage (#12579)
* 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>
2026-05-07 20:07:23 +02:00
Tim Eisele bc074b5283 Switch to new version scheme (#16758) 2026-05-06 17:41:34 -04:00
Shadowghost 4ebce39070 Implement Similarity providers 2026-05-03 23:43:01 +02:00
Niels van Velzen b8e25b49b3 Keep legacy authorization enabled 2026-05-03 22:20:24 +02:00
Bond-009 d4dda995e1 Merge pull request #16658 from jskoetsier/fix/image-jpg-mime-type
fix: add image/jpg to MIME type extension lookup
2026-04-23 20:31:34 +02:00
KGT1 1d44899606 Remove global subtitle configuration (#14957) 2026-04-18 17:06:46 +02:00
Sebas Koetsier 48b0029180 fix: add image/jpg to MIME type extension lookup
Although image/jpg is not a registered MIME type (RFC 2046 specifies
image/jpeg), several external providers return image/jpg as the
Content-Type for JPEG images:

- TMDb API (thumbnail/episode images)
- Schedules Direct EPG
- Various other metadata providers

Without this mapping, Jellyfin throws ArgumentException:
'Unable to determine image file extension from mime type image/jpg'

This causes library scans to fail when saving episode thumbnails
and other images from these providers, leading to repeated scan
failures and cancelled library scans.

PR #7052 previously added this but it was lost during the migration
to FrozenDictionary. Issue #13568 reports the same bug in 10.10+.

Fixes: jellyfin/jellyfin#13568
Related: jellyfin/jellyfin#7050, jellyfin/jellyfin#7052
2026-04-18 15:38:17 +02:00
Bond-009 046023b9dd Merge pull request #16380 from LTe/fix-subtitle-extraction-setting
Respect EnableSubtitleExtraction setting in subtitle delivery
2026-04-11 11:37:17 +02:00
Bond-009 193a15ea45 Merge pull request #16567 from shocklateboy92/fix/iso639-2-language-display
Fix language display for ISO 639-2-only codes (e.g. mul, und, mis, zxx)
2026-04-11 10:24:48 +02:00
Joshua M. Boniface e3b5cf4996 Merge pull request #16456 from joshuaboniface/fix-path-filesystem-logic 2026-04-09 00:37:00 -04:00
Lasath Fernando 553f38a237 Fix language display for ISO 639-2-only codes (e.g. mul, und)
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).
2026-04-08 12:38:24 -05:00
HeroBrine1st Erquilenne 9b00854e68 Add AlbumNormalizationGain field to BaseItemDto 2026-04-02 20:03:48 +03:00
Bond_009 a6da575785 Only set IsAvc for video streams
Also enables nullable for MediaStreamInfo
Makes more properties nullable that aren't always present
2026-03-29 14:27:49 +02:00
Joshua M. Boniface c22933260b Fix linting issue 2026-03-24 22:23:48 -04:00
Joshua M. Boniface 418beafebb Update FolderStorageInfo record 2026-03-23 17:15:49 -04:00
Bond-009 4eead536a9 Merge pull request #16368 from redinsch/fix/image-language-priority
Fix remote image language priority to prefer English over no-language
2026-03-13 20:25:36 +01:00
Piotr Niełacny 37983c943a Respect EnableSubtitleExtraction setting in subtitle delivery
Wire up EnableSubtitleExtraction config to MediaEncoder.CanExtractSubtitles
so the setting is actually respected. Gate subtitle extraction check behind
PlayMethod.Transcode since DirectPlay has no competing ffmpeg process.

Add parameterized tests for StreamBuilder.GetSubtitleProfile covering
text and graphical codecs, profile format matching, and extraction
setting behavior. Remove misplaced SubtitleEncoder extraction test.
2026-03-13 16:34:44 +01:00
jaxx2104 e4eba084dd Use generic Enum overloads to resolve CA2263 warnings
Replace Enum.Parse(typeof(T), ...) and Enum.GetNames(typeof(T)) with
their generic counterparts Enum.Parse<T>() and Enum.GetNames<T>() in
MediaBrowser.Model/Dlna for improved type safety.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:57:30 +09:00
redinsch ebb6949ea7 Fix remote image language priority to prefer English over no-language
Previously, images with no language were ranked higher (score 3) than
English images (score 2), causing poorly rated languageless images to
be selected over well-rated English alternatives for posters and logos.

Swap the priority so English is preferred over no-language images.
Backdrop images are unaffected as they have their own dedicated sorting.

Add unit tests for OrderByLanguageDescending.

Fixes #13310
2026-03-08 11:29:54 +01:00
Bond-009 25e8c6d591 Merge pull request #16255 from cosu/fix/streaminfo-malformed-query-string
Fix malformed query string in StreamInfo.ToUrl() causing 500 error via proxies
2026-02-26 19:31:19 +01:00
Cosmin Dumitru 37b50fe13c Fix malformed query string in StreamInfo.ToUrl() causing 500 error via proxies
StreamInfo.ToUrl() generated URLs like `/master.m3u8?&DeviceId=...` (note `?&`)
because `?` was appended to the path and all parameters started with `&`. When
the first optional parameter (DeviceProfileId) was null, the result was a
malformed query string.

This is harmless when clients hit Jellyfin directly (ASP.NET Core tolerates `?&`),
but when accessed through a reverse proxy that parses and re-serializes the URL
(e.g. Home Assistant ingress via aiohttp/yarl), `?&` becomes `?=&` — introducing
an empty-key query parameter. ParseStreamOptions then crashes on `param.Key[0]`
with IndexOutOfRangeException.

Changes:
- StreamInfo.ToUrl(): Track query start position and replace the first `&` with
  `?` after all parameters are appended, producing valid query strings
- ParseStreamOptions: Guard against empty query parameter keys
- Tests: Remove .Replace("?&", "?") workaround that masked the bug

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:08:35 +01:00
Bond_009 b346370dfc Fix build 2026-02-15 11:28:42 +01:00
Niels van Velzen 565de2d377 Merge pull request #16110 from nielsvanvelzen/api-depr
Remove some deprecated API members
2026-01-27 11:31:50 +01:00
Niels van Velzen b8d2f1f911 Remove unused usings 2026-01-27 11:13:32 +01:00
Niels van Velzen 360b6bcce1 Merge pull request #14809 from lostb1t/fix/subtitleencoder
fix: prevent premature disposal of HTTP subtitle streams
2026-01-26 12:00:14 +01:00
Niels van Velzen 874fd9ac0a Remove some deprecated API members 2026-01-25 21:39:57 +01:00
Bond-009 226da3b371 Fix zh-CN subtitle language display (#15947)
The DisplayTitle property was using .NET's CultureInfo.GetCultures(NeutralCultures)
to resolve language display names. Since zh-CN is a specific culture (not neutral),
it would fall back to the base 'zh' code, resulting in generic 'Chinese' instead
of 'Chinese (Simplified)'.

This change adds a LocalizedLanguage property to MediaStream that gets populated
via LocalizationManager.FindLanguageInfo() when streams are retrieved from the
database. This leverages Jellyfin's existing iso6392.txt mappings which correctly
map zh-CN to 'Chinese (Simplified)'.

The same pattern is already used for other localized strings like LocalizedDefault
and LocalizedExternal.
2026-01-18 12:19:31 +01:00
Abitofevrything 8d052a6cb1 Merge pull request #15926 from abitofevrything/feat/accurate_hls_seeking
Refactor HLS transcode seeking
2026-01-18 12:17:06 +01:00
Bond_009 9e480f6efb Update to .NET 10.0 2026-01-14 18:55:47 +01:00
ZeusCraft10 9039077286 Fix zh-CN subtitle language display
The DisplayTitle property was using .NET's CultureInfo.GetCultures(NeutralCultures)
to resolve language display names. Since zh-CN is a specific culture (not neutral),
it would fall back to the base 'zh' code, resulting in generic 'Chinese' instead
of 'Chinese (Simplified)'.

This change adds a LocalizedLanguage property to MediaStream that gets populated
via LocalizationManager.FindLanguageInfo() when streams are retrieved from the
database. This leverages Jellyfin's existing iso6392.txt mappings which correctly
map zh-CN to 'Chinese (Simplified)'.

The same pattern is already used for other localized strings like LocalizedDefault
and LocalizedExternal.
2026-01-05 06:22:44 -05:00
stevenaw e5fb071708 Optimize StringHelper.ToFirstUpper() 2025-12-31 09:26:31 -05:00
lostb1t 172b054f48 wip 2025-12-21 14:34:27 +01:00
lostb1t 2168847a45 wip 2025-12-21 14:34:27 +01:00
Cody Robibero 0b3d6676d1 Add ability to sort and filter activity log entries (#15583) 2025-12-08 21:01:32 -07:00
Niels van Velzen 2f8896c375 Merge pull request #15538 from KarkaLT/master
Add subtitle extraction timeout configuration option
2025-12-02 13:50:42 +01:00
Niels van Velzen a35ffbf17e Merge pull request #13977 from sususu98/fix/strm-local-subtitle-url
refactor(StreamInfo): reorganize subtitle URL logic and conditions
2025-11-27 16:33:19 +01:00
Niels van Velzen 19c232809e Merge pull request #14950 from nielsvanvelzen/security-remove-has-password
Deprecate HasPassword property on UserDto
2025-11-27 16:31:05 +01:00
Niels van Velzen 196c243a7d Disable legacy authorization methods by default 2025-11-18 16:17:04 +01:00
Karolis 5182aec13f Add subtitle extraction timeout configuration option 2025-11-17 15:18:29 +02:00