mirror of
https://github.com/jellyfin/jellyfin-media-player.git
synced 2024-11-23 05:59:43 +00:00
Fix removing trailing slash making JMP unable to connect to some servers
This commit is contained in:
parent
86e8b424d6
commit
1d1bb11dd0
@ -5,9 +5,8 @@ async function tryConnect(server) {
|
||||
if (!server.startsWith("http")) {
|
||||
server = "http://" + server;
|
||||
}
|
||||
server = server.replace(/\/+$/, "");
|
||||
|
||||
const url = server + "/System/Info/Public";
|
||||
serverBaseURL = server.replace(/\/+$/, "");
|
||||
const url = serverBaseURL + "/System/Info/Public";
|
||||
const response = await fetch(url);
|
||||
if (response.ok && (await response.json()).Id) {
|
||||
const htmlResponse = await fetch(server);
|
||||
|
Loading…
Reference in New Issue
Block a user