diff --git a/.azuredevops/pipelines/templates/variables.yml b/.azuredevops/pipelines/templates/variables.yml
index 205e68eaa..e90ecc049 100644
--- a/.azuredevops/pipelines/templates/variables.yml
+++ b/.azuredevops/pipelines/templates/variables.yml
@@ -27,4 +27,4 @@ variables:
value: "4.0.$(Build.BuildId)"
- name: isMain
- value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/develop'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))]
\ No newline at end of file
+ value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/develop'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))]
diff --git a/.gitignore b/.gitignore
index 1a1a229b8..fc31d399b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -247,5 +247,6 @@ _Pvt_Extensions
# Ignore local vscode config
*.vscode
/src/Ombi/database.json
+/src/Ombi/databases.json
/src/Ombi/healthchecksdb
/src/Ombi/ClientApp/package-lock.json
diff --git a/README.md b/README.md
index 2ff3e0ccd..60f886a72 100644
--- a/README.md
+++ b/README.md
@@ -40,8 +40,8 @@ Search the existing requests to see if your suggestion has already been submitte
___
-_**Note:** There is no longer an iOS app due to complications outside of our control._
-
+
+
# Features
Here are some of the features Ombi has:
diff --git a/src/Ombi.Api.Plex/IPlexApi.cs b/src/Ombi.Api.Plex/IPlexApi.cs
index c79ec50c9..a4597765e 100644
--- a/src/Ombi.Api.Plex/IPlexApi.cs
+++ b/src/Ombi.Api.Plex/IPlexApi.cs
@@ -23,7 +23,7 @@ namespace Ombi.Api.Plex
Task GetUsers(string authToken);
Task GetAccount(string authToken);
Task GetRecentlyAdded(string authToken, string uri, string sectionId);
- Task GetPin(int pinId);
+ Task GetPin(int pinId);
Task GetOAuthUrl(string code, string applicationUrl);
Task AddUser(string emailAddress, string serverId, string authToken, int[] libs);
}
diff --git a/src/Ombi.Api.Plex/Models/OAuth/OAuthPin.cs b/src/Ombi.Api.Plex/Models/OAuth/OAuthPin.cs
index e65cd91d4..3ab857ed3 100644
--- a/src/Ombi.Api.Plex/Models/OAuth/OAuthPin.cs
+++ b/src/Ombi.Api.Plex/Models/OAuth/OAuthPin.cs
@@ -1,7 +1,14 @@
using System;
+using System.Collections.Generic;
namespace Ombi.Api.Plex.Models.OAuth
{
+ public class OAuthContainer
+ {
+ public OAuthPin Result { get; set; }
+ public OAuthErrorsContainer Errors { get; set; }
+ }
+
public class OAuthPin
{
public int id { get; set; }
@@ -24,4 +31,15 @@ namespace Ombi.Api.Plex.Models.OAuth
public string coordinates { get; set; }
}
+ public class OAuthErrorsContainer
+ {
+ public List errors { get; set; }
+ }
+
+ public class OAuthErrors
+ {
+ public int code { get; set; }
+ public string message { get; set; }
+ }
+
}
\ No newline at end of file
diff --git a/src/Ombi.Api.Plex/PlexApi.cs b/src/Ombi.Api.Plex/PlexApi.cs
index 0d6356457..b80534bb9 100644
--- a/src/Ombi.Api.Plex/PlexApi.cs
+++ b/src/Ombi.Api.Plex/PlexApi.cs
@@ -1,7 +1,7 @@
using System;
using System.Net.Http;
-using System.Reflection;
using System.Threading.Tasks;
+using Newtonsoft.Json;
using Ombi.Api.Plex.Models;
using Ombi.Api.Plex.Models.Friends;
using Ombi.Api.Plex.Models.OAuth;
@@ -208,12 +208,28 @@ namespace Ombi.Api.Plex
return await Api.Request(request);
}
- public async Task GetPin(int pinId)
+ public async Task GetPin(int pinId)
{
var request = new Request($"api/v2/pins/{pinId}", "https://plex.tv/", HttpMethod.Get);
await AddHeaders(request);
- return await Api.Request(request);
+ var response = await Api.RequestContent(request);
+
+ if (response.Contains("errors"))
+ {
+ var errors = JsonConvert.DeserializeObject(response, Ombi.Api.Api.Settings);
+ return new OAuthContainer
+ {
+ Errors = errors
+ };
+ }
+
+ var pinResult = JsonConvert.DeserializeObject(response, Ombi.Api.Api.Settings);
+
+ return new OAuthContainer
+ {
+ Result = pinResult
+ };
}
public async Task GetOAuthUrl(string code, string applicationUrl)
diff --git a/src/Ombi.Api.Radarr/Models/V2/MovieResponse.cs b/src/Ombi.Api.Radarr/Models/V2/MovieResponse.cs
index 74d5c75ea..6eb2f1c5a 100644
--- a/src/Ombi.Api.Radarr/Models/V2/MovieResponse.cs
+++ b/src/Ombi.Api.Radarr/Models/V2/MovieResponse.cs
@@ -1,39 +1,122 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
+using System.Net.Mime;
namespace Ombi.Api.Radarr.Models
-{
+{
public class MovieResponse
{
public string title { get; set; }
+ public string originalTitle { get; set; }
+ public Alternatetitle[] alternateTitles { get; set; }
+ public int secondaryYearSourceId { get; set; }
public string sortTitle { get; set; }
- public double sizeOnDisk { get; set; }
+ public long sizeOnDisk { get; set; }
public string status { get; set; }
public string overview { get; set; }
- public string inCinemas { get; set; }
- public string physicalRelease { get; set; }
- public List images { get; set; }
+ public DateTime inCinemas { get; set; }
+ public DateTime physicalRelease { get; set; }
+ public DateTime digitalRelease { get; set; }
+ public Image[] images { get; set; }
public string website { get; set; }
- public bool downloaded { get; set; }
public int year { get; set; }
public bool hasFile { get; set; }
public string youTubeTrailerId { get; set; }
public string studio { get; set; }
public string path { get; set; }
- public int profileId { get; set; }
- public string minimumAvailability { get; set; }
+ public int qualityProfileId { get; set; }
public bool monitored { get; set; }
+ public string minimumAvailability { get; set; }
+ public bool isAvailable { get; set; }
+ public string folderName { get; set; }
public int runtime { get; set; }
- public string lastInfoSync { get; set; }
public string cleanTitle { get; set; }
public string imdbId { get; set; }
public int tmdbId { get; set; }
public string titleSlug { get; set; }
- public List genres { get; set; }
- public List