mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[PR #10415] Add function to fix cast with localhost server #12300
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#12300
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/10415
Author: @Sky-High
Created: 10/16/2023
Status: 🔄 Open
Base:
master← Head:cast-with-localhost-server📝 Commits (10+)
a208eb9resolve conflicts6cf5ee3Merge branch 'jellyfin:master' into cast-with-localhost-server241ed30Merge branch 'jellyfin:master' into cast-with-localhost-server7a63017Merge branch 'jellyfin:master' into cast-with-localhost-serverce206d3Merge branch 'jellyfin:master' into cast-with-localhost-server653c718Update Jellyfin.Networking/Manager/NetworkManager.cs69e1961resolve conflicts8b18ca3Merge branch 'cast-with-localhost-server' of https://github.com/Sky-High/jellyfin into cast-with-localhost-server80ac989Merge branch 'jellyfin:master' into cast-with-localhost-serverc83432fMerge branch 'jellyfin:master' into cast-with-localhost-server📊 Changes
2 files changed (+91 additions, -1 deletions)
View changed files
📝
Emby.Server.Implementations/ApplicationHost.cs(+8 -1)📝
src/Jellyfin.Networking/Manager/NetworkManager.cs(+83 -0)📄 Description
Adds a function to supply the webclient with a unique server LAN address after a localhost server API call. This enables the webclient to play to a chromecast receiver in such a case.
Changes
Explanation
This PR originates from the jellyfin-web issue with chromecast: https://github.com/jellyfin/jellyfin-web/issues/4745
While starting jellyfin-server it finds the bind addresses to listen to. And when starting jellyfin-web, it is able to find jellyfin-server alright. But when both jellyfin-server and jellyfin-web run on the same machine, they by default connect on url http://localhost:8096.
This works fine for the communication between jellyfin-web and jellyfin-server, but as a result this localhost url is also submitted to the cast receiver as url to connect to jellyfin-server. And for the cast receiver, localhost is not a valid address for jellyfin-server (in fact, with this address the cast receiver would try to find jellyfin-server internally ;-) )
So in this specific case of jellyfin-server and jellyfin-web communicating via localhost, the url to be passed to the cast receiver needs to be the 'real' LAN address of jellyfin-server.
As jellyfin-web is not able to establish this LAN address, jellyfin-server should deliver that via the API to jellyfin-client. So this issue requires changes in both jellyfin-server and jellyfin-web.
Issues
Fixes #10098
Remark
This is a resubmit of PR #10101 which was closed while the concerning src files were heavily changed and improved recently.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.