This commit is contained in:
tidusjar 2020-11-02 19:02:27 +00:00
commit 96abeb5861
10 changed files with 34 additions and 39 deletions

View file

@ -2,7 +2,7 @@
{
public class EmbyHelper
{
public static string GetEmbyMediaUrl(string mediaId, string customerServerUrl = null, bool isJellyfin = false)
public static string GetEmbyMediaUrl(string mediaId, string serverId, string customerServerUrl = null, bool isJellyfin = false)
{
string path = "item";
if (isJellyfin)
@ -13,13 +13,13 @@
{
if (!customerServerUrl.EndsWith("/"))
{
return $"{customerServerUrl}/#!/{path}?id={mediaId}";
return $"{customerServerUrl}/#!/{path}?id={mediaId}&serverId={serverId}";
}
return $"{customerServerUrl}#!/{path}?id={mediaId}";
return $"{customerServerUrl}#!/{path}?id={mediaId}&serverId={serverId}";
}
else
{
return $"https://app.emby.media/#!/{path}?id={mediaId}";
return $"https://app.emby.media/#!/{path}?id={mediaId}&serverId={serverId}";
}
}
}