The landing page now works for emby #435

This commit is contained in:
tidusjar 2017-02-17 21:36:27 +00:00
commit 12ff7378ba
5 changed files with 123 additions and 12 deletions

View file

@ -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