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.
|
* Use the local address (ULA, Unique Local Address) in that case.
|
||||||
*/
|
*/
|
||||||
const srvAddress = apiClient.serverAddress();
|
const srvAddress = apiClient.serverAddress();
|
||||||
const srvLocalAddress = srvAddress.startsWith('http://localhost') || srvAddress.startsWith('http://127.') || srvAddress.startsWith('http://[::1]')
|
const prefix = 'http' + ':' + '//';
|
||||||
? apiClient.serverInfo().LocalAddress : srvAddress;
|
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, {
|
message = Object.assign(message, {
|
||||||
userId: apiClient.getCurrentUserId(),
|
userId: apiClient.getCurrentUserId(),
|
||||||
|
@ -352,7 +353,7 @@ class CastPlayer {
|
||||||
receiverName: receiverName
|
receiverName: receiverName
|
||||||
});
|
});
|
||||||
|
|
||||||
console.debug('cc: message{'+message.command+'; '+srvAddress+' -> '+srvLocalAddress+'}');
|
console.debug('cc: message{' + message.command + '; ' + srvAddress + ' -> ' + srvLocalAddress + '}');
|
||||||
|
|
||||||
const bitrateSetting = appSettings.maxChromecastBitrate();
|
const bitrateSetting = appSettings.maxChromecastBitrate();
|
||||||
if (bitrateSetting) {
|
if (bitrateSetting) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue