mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Add separate Jellyfin server type
Due to forthcoming changes to the Jellyfin API, this adds support for Jellyfin as server type completely independent from Emby. It also undoes the workarounds that treated Jellyfin as a subset of Emby.
This commit is contained in:
parent
ce39f205f3
commit
9fe644f3db
116 changed files with 3672 additions and 103 deletions
27
src/Ombi.Helpers/JellyfinHelper.cs
Normal file
27
src/Ombi.Helpers/JellyfinHelper.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
namespace Ombi.Helpers
|
||||
{
|
||||
public static class JellyfinHelper
|
||||
{
|
||||
public static string GetJellyfinMediaUrl(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.jellyfin.media/web/index.html#!/{path}?id={mediaId}&serverId={serverId}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue