mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -07:00
27 lines
925 B
C#
27 lines
925 B
C#
namespace Ombi.Helpers
|
|
{
|
|
public class EmbyHelper
|
|
{
|
|
public static string GetEmbyMediaUrl(string mediaId, string serverId, string customerServerUrl = null, bool isJellyfin = false)
|
|
{
|
|
//web/index.html#!/details|item
|
|
string path = "item";
|
|
if (isJellyfin)
|
|
{
|
|
path = "details";
|
|
}
|
|
if (customerServerUrl.HasValue())
|
|
{
|
|
if (!customerServerUrl.EndsWith("/"))
|
|
{
|
|
return $"{customerServerUrl}/web/index.html#!/{path}?id={mediaId}&serverId={serverId}";
|
|
}
|
|
return $"{customerServerUrl}web/index.html#!/{path}?id={mediaId}&serverId={serverId}";
|
|
}
|
|
else
|
|
{
|
|
return $"https://app.emby.media/web/index.html#!/{path}?id={mediaId}&serverId={serverId}";
|
|
}
|
|
}
|
|
}
|
|
}
|