1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #221 from agrenott/fix_chromcecast

Fix local chromecast play behind reverse proxy
This commit is contained in:
Vasily 2019-04-02 00:12:48 +03:00 committed by GitHub
commit 1d55d34bba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,8 +187,13 @@ define(['events'], function (events) {
return apiClient.getEndpointInfo().then(function (endpoint) {
if (endpoint.IsInNetwork) {
return apiClient.getPublicSystemInfo().then(function (info) {
addToCache(serverAddress, info.LocalAddress);
return info.LocalAddress;
var localAddress = info.LocalAddress
if (!localAddress) {
console.log("No valid local address returned, defaulting to external one")
localAddress = serverAddress;
}
addToCache(serverAddress, localAddress);
return localAddress;
});
} else {
addToCache(serverAddress, serverAddress);