mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 19:40:05 -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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,8 +14,10 @@ namespace Ombi.Helpers
|
|||
public static EventId RadarrCacher => new EventId(2001);
|
||||
public static EventId PlexEpisodeCacher => new EventId(2002);
|
||||
public static EventId EmbyContentCacher => new EventId(2003);
|
||||
public static EventId JellyfinContentCacher => new EventId(2012);
|
||||
public static EventId PlexUserImporter => new EventId(2004);
|
||||
public static EventId EmbyUserImporter => new EventId(2005);
|
||||
public static EventId JellyfinUserImporter => new EventId(2013);
|
||||
public static EventId SonarrCacher => new EventId(2006);
|
||||
public static EventId CouchPotatoCacher => new EventId(2007);
|
||||
public static EventId PlexContentCacher => new EventId(2008);
|
||||
|
@ -43,4 +45,4 @@ namespace Ombi.Helpers
|
|||
public static EventId Updater => new EventId(6000);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue