Revert "fix(backend): fixes Jellyfin/Emby links if server is initially setup with a trailing /"

This commit is contained in:
Samuel Bartík
2022-10-13 23:08:20 +02:00
committed by GitHub
parent 15c79e03a5
commit 5b10da4073
4 changed files with 7 additions and 28 deletions

View File

@@ -205,16 +205,10 @@ class Media {
? externalHostname
: hostname;
if (this.jellyfinMediaId) {
this.mediaUrl = new URL(
`/web/index.html#!/${pageName}?id=${this.jellyfinMediaId}&context=home&serverId=${serverId}`,
jellyfinHost
).href;
this.mediaUrl = `${jellyfinHost}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId}&context=home&serverId=${serverId}`;
}
if (this.jellyfinMediaId4k) {
this.mediaUrl4k = new URL(
`/web/index.html#!/${pageName}?id=${this.jellyfinMediaId4k}&context=home&serverId=${serverId}`,
jellyfinHost
).href;
this.mediaUrl4k = `${jellyfinHost}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId4k}&context=home&serverId=${serverId}`;
}
}
}