From a2c27cfa95de7008a7c96a30275375b44555a68b Mon Sep 17 00:00:00 2001 From: Shilong Jiang Date: Thu, 14 Apr 2022 20:10:57 +0800 Subject: [PATCH] feat: add emby detail url support --- server/entity/Media.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/entity/Media.ts b/server/entity/Media.ts index 8d36afa7a..e1907a02e 100644 --- a/server/entity/Media.ts +++ b/server/entity/Media.ts @@ -163,11 +163,12 @@ class Media { this.mediaUrl4k = `https://app.plex.tv/desktop#!/server/${settings.plex.machineId}/details?key=%2Flibrary%2Fmetadata%2F${this.ratingKey4k}`; } } else { + const pageName = process.env.JELLYFIN_TYPE === 'emby' ? 'item' : 'details'; if (this.jellyfinMediaId) { - this.mediaUrl = `${settings.jellyfin.hostname}/web/index.html#!/details?id=${this.jellyfinMediaId}&context=home&serverId=${settings.jellyfin.serverId}`; + this.mediaUrl = `${settings.jellyfin.hostname}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId}&context=home&serverId=${settings.jellyfin.serverId}`; } if (this.jellyfinMediaId4k) { - this.mediaUrl4k = `${settings.jellyfin.hostname}/web/index.html#!/details?id=${this.jellyfinMediaId4k}&context=home&serverId=${settings.jellyfin.serverId}`; + this.mediaUrl4k = `${settings.jellyfin.hostname}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId4k}&context=home&serverId=${settings.jellyfin.serverId}`; } } }