Skip to content

Fix external subtitles not served when the working directory differs from -path - #193

Merged
anacrolix merged 1 commit into
anacrolix:masterfrom
atanas-vladimirov:subtitles
Sep 27, 2026
Merged

anacrolix merged 1 commit into
anacrolix:masterfrom
atanas-vladimirov:subtitles

Conversation

@atanas-vladimirov

Copy link
Copy Markdown
Contributor

RootObjectPath is reset to ./ after the fs.FS is built, so filePath() returns a path relative to the share. /res opens that path with ServeFileFS. serveSubtitle still called http.ServeFile, which resolves it from the process working directory, so a sidecar .srt 404s unless dms was started in the media root.

With this fix VLC can list/play the external subtitles.
Any comments are welcome :)

Best wishes,
Atanas

…from -path

RootObjectPath is reset to ./ after the fs.FS is built, so filePath()
returns a path relative to the share. /res opens that path with
ServeFileFS. serveSubtitle still called http.ServeFile, which resolves
it from the process working directory, so a sidecar .srt 404s unless
dms was started in the media root.
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@anacrolix
anacrolix merged commit ecf559f into anacrolix:master Sep 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants