aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
10 hoursMerge pull request #17442 from Shadowghost/fix-numbers-in-episode-namesCody Robibero
Fix hyphenated numbers in episode titles parsed as multi-episodes
10 hoursMerge pull request #17399 from Shadowghost/fix-extra-yearCody Robibero
Fix incorrect year on local trailers
11 hoursAlways inherit from owner item and add testsShadowghost
12 hoursFix hyphenated numbers in episode titles parsed as multi-episodesShadowghost
14 hoursMerge pull request #17395 from paoloantinori/fix/userdata-null-user-nre-masterCody Robibero
Avoid NRE when sorting by user-dependent keys without a user
16 hoursRemove added comments (#17395 review)Paolo Antinori
25 hoursMerge pull request #17234 from Eneo-org/fix/syncplay-playqueue-indexCody Robibero
Fix play queue index handling in SyncPlay
25 hoursMerge pull request #17402 from Shadowghost/clean-forced-sort-nameCody Robibero
Apply cleaning logic on ForcedSortName
3 daysCheck the "name" tag, not just "title"Richard Webster
4 daysApply cleaning logic on ForcedSortNameShadowghost
4 daysfix: avoid NRE when sorting by user-dependent keys without a userPaolo Antinori
A query sorted by a user-dependent key (PlayCount, IsFavoriteOrLiked, DatePlayed, IsPlayed, IsUnplayed) but carrying no User caused a NullReferenceException inside UserDataManager.GetUserData, surfacing as "Failed to compare two elements in the array" (InvalidOperationException wrapping the NRE from the LINQ sort) and 500-ing the /Items request. Root cause: LibraryManager.GetComparer assigned comparer.User = user without a null guard, so PlayCountComparer.GetValue called UserDataManager.GetUserData(null, item), dereferencing user.Id. Two-part fix: - LibraryManager.GetComparer: when user is null and the sort key requires a user (IUserBaseItemComparer), substitute the SortName comparer so the result stays deterministic instead of 500-ing. SortName is the project's canonical tiebreaker (ItemsController injects it for album-by-artist). - UserDataManager.GetUserData: ArgumentNullException.ThrowIfNull(user) as defense in depth (matches the existing guards on the SaveUserData overloads in the same file). On master this overload was rewritten to use ResolveUserDataRow, so the NRE dereferences user.Id rather than user.InternalId as on the release branch — same bug, different line. Also fixes DateLastMediaAddedComparer being statically mis-tagged as IUserBaseItemComparer: its GetDate is static and never reads User, so it does not need one. Without this, the SortName fallback above would wrongly engage for DateLastContentAdded on anonymous queries (returning SortName order instead of date order). Re-tagged to IBaseItemComparer and dropped the unused User/UserManager/UserDataManager properties. Tests: - UserDataManagerTests.GetUserData_NullUser_ThrowsArgumentNullException: reproduces the crash (NRE -> now ArgumentNullException). Added to master's existing UserDataManagerTests. - LibraryManagerSortTests.Sort_UserDependentKey_NullUser_FallsBackToSortNameWithoutThrowing: Sort with a user-dependent key + null user no longer throws and returns items ordered by the SortName fallback (direction preserved). - LibraryManagerSortTests.Sort_DateLastContentAdded_NullUser_OrdersByDateNotSortName: guards that DateLastContentAdded still sorts by date with no user (fixture chosen so date-desc and SortName-desc disagree, so a revert is caught). Full Jellyfin.Server.Implementations.Tests suite: 642 passed, 0 failed. Fixes #17393
4 daysMerge pull request #17227 from altqx/masterv12.0-rc3Cody Robibero
Match VobSub MKS subtitle profiles by container
4 daysMerge pull request #17370 from zerafachris/fix/item-update-null-optional-fieldsCody Robibero
fix: don't throw ArgumentNullException on partial UpdateItem payloads (#17366)
4 daysMerge pull request #17369 from Shadowghost/harden-startup-wizardCody Robibero
Prevent unauthenticated re-run of the startup wizard on misconfiguration
4 daysFix incorrect year on local trailersShadowghost
4 daysMerge pull request #17160 from 854562/truncate-language-stringsCody Robibero
Truncate ISO-639-2 language display names at first delimiter
5 daysFix subtitle encoding for local files (#17281)Tim Eisele
* Fix subtitle encoding * Add short-circuit * Use IsTextFormat * Update MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs Co-authored-by: Bond-009 <bond.009@outlook.com> --------- Co-authored-by: Bond-009 <bond.009@outlook.com>
5 daysMerge pull request #17368 from Shadowghost/security-path-traversal-fixesBond-009
Backport and extend path traversal fixes
5 daysfix: use build output directory for backup test temp root to avoid low ↵zerafachris
free-space failures on Windows CI runners BackupServiceTests rooted its temp directory under Path.GetTempPath(), which on GitHub-hosted windows-latest runners resolves to the constrained system C: drive. BackupService.CreateBackupAsync requires 5GiB free at the backup path before starting, and the C: drive's free temp space can dip below that, failing CreateBackupAsync_WithCorruptKeyframeDataRow_SkipsRowAndCompletesBackup even though the fix itself is correct. Rooting the test directory under AppContext.BaseDirectory keeps it on the same (much larger) drive as the repo checkout on all platforms, without touching the real BackupService free-space check.
5 daysMake ItemUpdateController.UpdateItem internal instead of reflectionzerafachris
Addresses review feedback from @Bond-009 on PR #17370: the test helper InvokeUpdateItem was invoking the private UpdateItem(BaseItemDto, BaseItem) method via reflection. Jellyfin.Api.csproj already grants InternalsVisibleTo("Jellyfin.Api.Tests"), so the method is changed to internal and the test now calls it directly, removing the GetMethod/Invoke boilerplate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5 daysMerge remote-tracking branch 'upstream/master' into ↵Shadowghost
security-path-traversal-fixes # Conflicts: # Jellyfin.Api/Controllers/HlsSegmentController.cs # Jellyfin.Api/Controllers/PluginsController.cs
5 daysMerge branch 'master' into fix/backup-skip-corrupt-keyframe-dataCody Robibero
5 daysMerge pull request #16933 from ↵Cody Robibero
WizardOfYendor1/fix/livetv-guide-image-optimization Feat (fix) - Skip reprocessing program information when importing XMLTV EPG data
5 daysMerge pull request #17282 from TowyTowy/fix/13137-clear-profile-imageCody Robibero
Fix profile image being impossible to clear when its in-memory key is temporary
5 daysMerge pull request #17320 from TaterTechStudios/fix/item-correct-selectorCody Robibero
Fix: Fetch the correct row matching the most up to date file
5 daysMerge pull request #17342 from LTe/fix-subtitle-conversion-raceCody Robibero
Fix race condition in concurrent subtitle conversion
5 daysMerge pull request #17254 from sjakub/attribute_aliasesCody Robibero
Add additional attribute aliases and improve attribute detection
5 daysExtract truncation logic to helper and add tests854562
6 daysFix SchedulesDirect image limit recognition (#17347)Bond-009
6 daysRemove libpostproc check for ffmpeg version validation (#17384)gnattu
Remove libpostproc check for ffmpeg version validation
6 daysMerge pull request #17365 from Shadowghost/fix-resume-perfBond-009
Fix Resume query performance
8 daysMerge pull request #17327 from ↵Bond-009
Shadowghost/remove-playbackpositionticks-mediasourceinfo Remove PlaybackPositionTicks from MediaSourceInfo
8 daysMerge pull request #17280 from Shadowghost/remove-image-override-hackBond-009
Remove episode image override hack
8 daysMerge pull request #17191 from IDisposable/fix/handler-path-traversalBond-009
Fix path transversal exposure in Plugins
8 daysfix: don't throw ArgumentNullException on partial UpdateItem payloads (#17366)zerafachris
BaseItemDto.Genres, .Tags, and .ProviderIds are plain auto-properties with no default initializer, so they deserialize to null when a client omits them from a partial POST /Items/{itemId} body. The OpenAPI spec documents every BaseItemDto field as optional, but ItemUpdateController.UpdateItem fed these three properties straight into Distinct()/Select()/ToList() without a null check, so a request that (for example) only sets Tags throws ArgumentNullException("source") once it reaches the unguarded Genres line, before Tags is even processed. Guard all three assignments with the same "if (request.X is not null)" pattern already used for the neighboring Studios/Taglines/ProductionLocations fields in this method, so omitted fields are left unchanged instead of crashing the request. Adds ItemUpdateControllerTests covering the reported repro (only Tags supplied) and a companion case asserting existing Genres/ProviderIds are preserved when omitted from the payload. Signed-off-by: zerafachris <christopher.zerafa@blocklabs.io>
8 daysPrevent unauthenticated re-run of the startup wizard on misconfigurationShadowghost
8 daysHarden remaining path-construction sinks against traversalShadowghost
8 daysSanitize media attachment and lyric paths against traversalShadowghost
8 daysSanitize ClientLog upload filename to prevent path traversalShadowghost
8 daysSkip corrupt KeyframeData rows during full system backupzerafachris
A single row with malformed KeyframeTicks JSON (e.g. a truncated array from an interrupted write) currently aborts the entire backup, because the try/catch in BackupService.CreateBackupAsync only wraps serialization of an already-materialized entity, not the enumeration itself. EF Core throws JsonReaderException from MoveNextAsync() while materializing the corrupt row, which propagates past that catch block. Switch to manual enumerator iteration so MoveNextAsync() failures can be caught per-row, logged as a warning identifying the affected table, and skipped, allowing the remaining rows and the rest of the backup to complete. Fixes #17216 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
10 daysFix tie-breaker performanceShadowghost
10 daysMove GetUserDataBatch to use ResolveUserDataRow when item.UserData isn't ↵Jordan Rushing
preloaded
10 daysFix SchedulesDirect image limit recognitionShadowghost
11 daysFix race condition in concurrent subtitle conversionPiotr Niełacny
SubtitleEncoder.ConvertSubtitles parsed subtitles with libse's static Subtitle.Parse, which iterates a statically cached list of shared SubtitleFormat instances. Format parsers keep mutable per-parse state on the instance, so concurrent subtitle requests corrupted each other's output (cues mixed across streams and languages, truncated files) or failed with NullReferenceException when format detection broke down and Subtitle.Parse returned null. Parse through the injected ISubtitleParser instead. SubtitleEditParser instantiates a fresh format parser per call, so requests no longer share state. Its Parse method now returns the libse Subtitle directly (the SubtitleTrackInfo flattening was unused since the SubtitleEdit writer rework) so the writers keep full fidelity such as ASS styling.
12 daysremove PlaybackPositionTicks from MediaSourceInfoShadowghost
12 daysFix: Fetch the correct row matching the most up to date fileJordan Rushing
2026-07-09Fix profile image being impossible to clear when its in-memory key is temporaryTowyTowy
ClearProfileImageAsync removed the ProfileImage instance attached to the passed-in User, but that instance can carry a stale, never-persisted (temporary) key because UpdateUserAsync creates the persisted image on a separately loaded entity and never copies the generated key back. Removing that detached entity on a fresh DbContext made EF Core throw InvalidOperationException ('ImageInfo.Id has a temporary value'), leaving the profile image impossible to delete or replace. Load the tracked, persisted user and remove its actual ProfileImage, matching the removal pattern already used in UpdateUserAsync. Adds regression tests covering the temporary-key case and the no-image no-op (the first fails before this change and passes after). Fixes #13137 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09Cleanup PreferEpisodeParentPoster)Shadowghost
2026-07-09Remove episode image override hackShadowghost
2026-07-07Added more aliases for attributesJakub Schmidtke
Adds tvdb alias for tvdbid and imdb alias for imdbid. It also fixes an issue where tmdb alias was being ignored if it was followed by something like "tmdbidfoo". The same issue prevented imdb pattern matching from working, if it was followed by something like "imdbidfoo". It also allows for detecting the first matching occurence, whether it was an alias or not. Finally, it ignores attributes with values consisting of only whitespaces.