Properly fetch subtitles from Jellyfin with a base URL configured#833
Merged
killergerbah merged 2 commits intokillergerbah:mainfrom Dec 6, 2025
Merged
Properly fetch subtitles from Jellyfin with a base URL configured#833killergerbah merged 2 commits intokillergerbah:mainfrom
killergerbah merged 2 commits intokillergerbah:mainfrom
Conversation
killergerbah
reviewed
Dec 3, 2025
| const extension = 'srt'; | ||
| var url = | ||
| window.location.origin + | ||
| ApiClient._serverAddress + |
Owner
There was a problem hiding this comment.
Should this still fallback to the window.location.origin ? I'm worried that ApiClient._serverAddress could change as the field is prefixed by an underscore which usually indicates its a "private" field?
Contributor
Author
There was a problem hiding this comment.
I was following the lead of the code a bit above which fetches the device ID in a similar way.
It seems like current versions of both Jellyfin and Emby expose both through "public" getter functions (ApiClient.deviceId() and ApiClient.serverAddress()) that are probably cleaner to use with less risk of changes.
killergerbah
approved these changes
Dec 4, 2025
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of assuming that the Jellyfin server is running on
/, use the API path from the API client we're hooking as a base.fixes #586