mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
The landing page now works for emby #435
This commit is contained in:
parent
febdaa0a15
commit
12ff7378ba
5 changed files with 123 additions and 12 deletions
|
@ -71,6 +71,26 @@ namespace Ombi.Api
|
|||
return obj;
|
||||
}
|
||||
|
||||
public EmbySystemInfo GetSystemInformation(string apiKey, Uri baseUrl)
|
||||
{
|
||||
var request = new RestRequest
|
||||
{
|
||||
Resource = "emby/System/Info",
|
||||
Method = Method.GET
|
||||
};
|
||||
|
||||
AddHeaders(request, apiKey);
|
||||
|
||||
var policy = RetryHandler.RetryAndWaitPolicy((exception, timespan) => Log.Error(exception, "Exception when calling GetSystemInformation for Emby, Retrying {0}", timespan), new[] {
|
||||
TimeSpan.FromSeconds (1),
|
||||
TimeSpan.FromSeconds(5)
|
||||
});
|
||||
|
||||
var obj = policy.Execute(() => Api.ExecuteJson<EmbySystemInfo>(request, baseUrl));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
public EmbyItemContainer<EmbyLibrary> ViewLibrary(string apiKey, string userId, Uri baseUri)
|
||||
{
|
||||
var request = new RestRequest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue