feat: add emby detail url support

This commit is contained in:
Shilong Jiang
2022-04-14 20:10:57 +08:00
committed by notfakie
parent da88771da5
commit 88c2c5ebcd

View File

@@ -189,19 +189,14 @@ class Media {
}
}
} else {
const pageName =
process.env.JELLYFIN_TYPE === 'emby' ? 'item' : 'details';
const { hostname, serverId } = getSettings().jellyfin;
if (this.jellyfinMediaId) {
this.mediaUrl = `${
getSettings().jellyfin.hostname
}/web/index.html#!/details?id=${
this.jellyfinMediaId
}&context=home&serverId=${getSettings().jellyfin.serverId}`;
this.mediaUrl = `${hostname}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId}&context=home&serverId=${serverId}`;
}
if (this.jellyfinMediaId4k) {
this.mediaUrl4k = `${
getSettings().jellyfin.hostname
}/web/index.html#!/details?id=${
this.jellyfinMediaId4k
}&context=home&serverId=${getSettings().jellyfin.serverId}`;
this.mediaUrl4k = `${hostname}/web/index.html#!/${pageName}?id=${this.jellyfinMediaId4k}&context=home&serverId=${serverId}`;
}
}
}