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

Merge pull request #2664 from dmitrylyzo/skip-app-url

Remove trying app URL as server URL
This commit is contained in:
Bill Thornton 2021-06-11 01:46:10 -04:00 committed by GitHub
commit d8db87f42b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,8 +22,13 @@ export async function serverAddress() {
// Use servers specified in config.json
const urls = await webSettings.getServers();
// Otherwise use computed base URL
if (urls.length == 0) {
if (urls.length === 0) {
// Don't use app URL as server URL
if (window.NativeShell) {
return Promise.resolve();
}
// Otherwise use computed base URL
const index = window.location.href.toLowerCase().lastIndexOf('/web');
if (index != -1) {
urls.push(window.location.href.substring(0, index));