From d566cbc236f224150d534ed4afd3102281c68fa5 Mon Sep 17 00:00:00 2001 From: Ashyni Date: Sun, 3 May 2020 17:50:16 +0200 Subject: [PATCH] fix jellyfin api call --- src/Ombi.Api.Emby/JellyfinApi.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Ombi.Api.Emby/JellyfinApi.cs b/src/Ombi.Api.Emby/JellyfinApi.cs index 3fbec3806..197fba684 100644 --- a/src/Ombi.Api.Emby/JellyfinApi.cs +++ b/src/Ombi.Api.Emby/JellyfinApi.cs @@ -26,7 +26,7 @@ namespace Ombi.Api.Emby /// public async Task> GetUsers(string baseUri, string apiKey) { - var request = new Request("jellyfin/users", baseUri, HttpMethod.Get); + var request = new Request("users", baseUri, HttpMethod.Get); AddHeaders(request, apiKey); var obj = await Api.Request>(request); @@ -36,7 +36,7 @@ namespace Ombi.Api.Emby public async Task GetSystemInformation(string apiKey, string baseUrl) { - var request = new Request("jellyfin/System/Info", baseUrl, HttpMethod.Get); + var request = new Request("System/Info", baseUrl, HttpMethod.Get); AddHeaders(request, apiKey); @@ -47,7 +47,7 @@ namespace Ombi.Api.Emby public async Task GetPublicInformation(string baseUrl) { - var request = new Request("jellyfin/System/Info/public", baseUrl, HttpMethod.Get); + var request = new Request("System/Info/public", baseUrl, HttpMethod.Get); AddHeaders(request, string.Empty); @@ -58,7 +58,7 @@ namespace Ombi.Api.Emby public async Task LogIn(string username, string password, string apiKey, string baseUri) { - var request = new Request("jellyfin/users/authenticatebyname", baseUri, HttpMethod.Post); + var request = new Request("users/authenticatebyname", baseUri, HttpMethod.Post); var body = new { username, @@ -77,7 +77,7 @@ namespace Ombi.Api.Emby public async Task> GetCollection(string mediaId, string apiKey, string userId, string baseUrl) { - var request = new Request($"jellyfin/users/{userId}/items?parentId={mediaId}", baseUrl, HttpMethod.Get); + var request = new Request($"users/{userId}/items?parentId={mediaId}", baseUrl, HttpMethod.Get); AddHeaders(request, apiKey); request.AddQueryString("Fields", "ProviderIds,Overview"); @@ -118,7 +118,7 @@ namespace Ombi.Api.Emby private async Task GetInformation(string mediaId, string apiKey, string userId, string baseUrl) { - var request = new Request($"jellyfin/users/{userId}/items/{mediaId}", baseUrl, HttpMethod.Get); + var request = new Request($"users/{userId}/items/{mediaId}", baseUrl, HttpMethod.Get); AddHeaders(request, apiKey); var response = await Api.RequestContent(request); @@ -128,7 +128,7 @@ namespace Ombi.Api.Emby private async Task> GetAll(string type, string apiKey, string userId, string baseUri, bool includeOverview = false) { - var request = new Request($"jellyfin/users/{userId}/items", baseUri, HttpMethod.Get); + var request = new Request($"users/{userId}/items", baseUri, HttpMethod.Get); request.AddQueryString("Recursive", true.ToString()); request.AddQueryString("IncludeItemTypes", type); @@ -144,7 +144,7 @@ namespace Ombi.Api.Emby } private async Task> GetAll(string type, string apiKey, string userId, string baseUri, bool includeOverview, int startIndex, int count) { - var request = new Request($"jellyfin/users/{userId}/items", baseUri, HttpMethod.Get); + var request = new Request($"users/{userId}/items", baseUri, HttpMethod.Get); request.AddQueryString("Recursive", true.ToString()); request.AddQueryString("IncludeItemTypes", type);