mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix-sonar-and-lint
This commit is contained in:
parent
51eeef00a6
commit
7746795730
1 changed files with 4 additions and 3 deletions
|
@ -339,8 +339,9 @@ class CastPlayer {
|
|||
* Use the local address (ULA, Unique Local Address) in that case.
|
||||
*/
|
||||
const srvAddress = apiClient.serverAddress();
|
||||
const srvLocalAddress = srvAddress.startsWith('http://localhost') || srvAddress.startsWith('http://127.') || srvAddress.startsWith('http://[::1]')
|
||||
? apiClient.serverInfo().LocalAddress : srvAddress;
|
||||
const prefix = 'http' + ':' + '//';
|
||||
const checkLocalhost = srvAddress.startsWith(prefix + 'localhost') || srvAddress.startsWith(prefix + '127.') || srvAddress.startsWith(prefix + '[::1]')
|
||||
const srvLocalAddress = checkLocalhost ? apiClient.serverInfo().LocalAddress : srvAddress;
|
||||
|
||||
message = Object.assign(message, {
|
||||
userId: apiClient.getCurrentUserId(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue