mirror of
https://github.com/sct/overseerr.git
synced 2025-12-26 16:27:17 +01:00
fix(backend): fixes Jellyfin/Emby links if server is initially setup with a trailing /
Fixes #168 and #220
This commit is contained in:
@@ -205,10 +205,16 @@ class Media {
|
||||
? externalHostname
|
||||
: hostname;
|
||||
if (this.jellyfinMediaId) {
|
||||
this.mediaUrl = `${jellyfinHost}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId}&context=home&serverId=${serverId}`;
|
||||
this.mediaUrl = new URL(
|
||||
`/web/index.html#!/${pageName}?id=${this.jellyfinMediaId}&context=home&serverId=${serverId}`,
|
||||
jellyfinHost
|
||||
).href;
|
||||
}
|
||||
if (this.jellyfinMediaId4k) {
|
||||
this.mediaUrl4k = `${jellyfinHost}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId4k}&context=home&serverId=${serverId}`;
|
||||
this.mediaUrl4k = new URL(
|
||||
`/web/index.html#!/${pageName}?id=${this.jellyfinMediaId4k}&context=home&serverId=${serverId}`,
|
||||
jellyfinHost
|
||||
).href;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user