mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Finished #884
This commit is contained in:
parent
ad2169ca17
commit
ba80dfe3aa
4 changed files with 26 additions and 22 deletions
|
@ -28,6 +28,7 @@
|
|||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using Ombi.Api.Interfaces;
|
||||
|
@ -73,7 +74,9 @@ namespace Ombi.Api
|
|||
{
|
||||
return new WatcherListStatusResultContainer();
|
||||
}
|
||||
return JsonConvert.DeserializeObject<WatcherListStatusResultContainer>(response.Content);
|
||||
var items = JsonConvert.DeserializeObject<List<WatcherListStatusResult>>(response.Content);
|
||||
|
||||
return new WatcherListStatusResultContainer {Results = items};
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -95,7 +98,9 @@ namespace Ombi.Api
|
|||
{
|
||||
return new WatcherListStatusResultContainer();
|
||||
}
|
||||
return JsonConvert.DeserializeObject<WatcherListStatusResultContainer>(response.Content);
|
||||
var items = JsonConvert.DeserializeObject<List<WatcherListStatusResult>>(response.Content);
|
||||
|
||||
return new WatcherListStatusResultContainer { Results = items };
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -114,9 +119,10 @@ namespace Ombi.Api
|
|||
RestRequest request;
|
||||
request = new RestRequest
|
||||
{
|
||||
Resource = "/api"
|
||||
Resource = string.IsNullOrEmpty(imdbid) ? "/api?apikey={apikey}&mode={mode}" : "/api?apikey={apikey}&mode={mode}&imdbid={imdbid}"
|
||||
};
|
||||
|
||||
|
||||
request.AddUrlSegment("apikey", apiKey);
|
||||
if (!string.IsNullOrEmpty(imdbid))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue