mirror of
https://github.com/jellyfin/jellyfin-media-player.git
synced 2024-11-22 21:49:56 +00:00
Merge pull request #755 from fredguile/fix-754
Fix removing trailing slash making JMP unable to connect to some servers
This commit is contained in:
commit
d0f27ce838
@ -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