mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #15263] [MERGED] Resolve symlinks for static media source infos #14267
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/15263
Author: @revam
Created: 10/28/2025
Status: ✅ Merged
Merged: 11/9/2025
Merged by: @crobibero
Base:
release-10.11.z← Head:bugfix/resolve-media-path-before-use📝 Commits (9)
4a9eb4eResolve symlinks for static media source infosa4147b0Use video.Path instead of mediaSource.Path in trickplay manager when checking parent directory0c7cd95Only attempt to resolve target if using file protocol5e8b7ffCatchIOExceptions when attempting to resolve path85f1c29AddResolveLinkTargethelpers to account for runtime issues withreturnFinalTarget4fbfbbeApply changes based on feedback251a9c7Remove now unnecessarytry…catchforIOExceptions587abd4Refactor loop to use the visitor pattern to keep track of which nodes/paths have been visited.47344b3Add fast path to avoid allocations if not a link📊 Changes
5 files changed (+91 additions, -5 deletions)
View changed files
📝
Emby.Server.Implementations/IO/ManagedFileSystem.cs(+2 -1)📝
Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs(+2 -1)📝
Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs(+2 -2)📝
MediaBrowser.Controller/Entities/BaseItem.cs(+11 -1)📝
MediaBrowser.Controller/IO/FileSystemHelper.cs(+74 -0)📄 Description
Changes
This change will prevent issues like trying to Direct Play a symbolic link resulting in an out of range exception at the deepest possible level instead of in the API layer — in which it was handled before #15209 removed the symbolic link handler from the API — to ensure both the API and any internal processes using the media sources will always use a real file and never a symbolic link.
As part of this change, I swept through the code base to look for potential issues this may introduce, and found that the trickplay manager is checking the parent of the media source when checking if the video is in a backdrop folder, so i changed that to instead use the video path. I did not find any other issues in regards to this change.
Issues / PRs
Follow up for https://github.com/jellyfin/jellyfin/pull/15209
Player errs out when you try to play a symlinked file on 10.11.1;
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.