-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from PCJones/develop
v0.5 release
- Loading branch information
Showing
29 changed files
with
673 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
UmlautAdaptarr/Options/ArrOptions/ArrApplicationBaseOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace UmlautAdaptarr.Options.ArrOptions | ||
{ | ||
/// <summary> | ||
/// Base Options for ARR applications | ||
/// </summary> | ||
public class ArrApplicationBaseOptions | ||
{ | ||
/// <summary> | ||
/// Indicates whether the Arr application is enabled. | ||
/// </summary> | ||
public bool Enabled { get; set; } | ||
|
||
/// <summary> | ||
/// The host of the ARR application. | ||
/// </summary> | ||
public string Host { get; set; } | ||
|
||
/// <summary> | ||
/// The API key of the ARR application. | ||
/// </summary> | ||
public string ApiKey { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace UmlautAdaptarr.Options.ArrOptions | ||
{ | ||
/// <summary> | ||
/// Lidarr Options | ||
/// </summary> | ||
public class LidarrInstanceOptions : ArrApplicationBaseOptions | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace UmlautAdaptarr.Options.ArrOptions | ||
{ | ||
/// <summary> | ||
/// Readarr Options | ||
/// </summary> | ||
public class ReadarrInstanceOptions : ArrApplicationBaseOptions | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace UmlautAdaptarr.Options.ArrOptions | ||
{ | ||
/// <summary> | ||
/// Sonarr Options | ||
/// </summary> | ||
public class SonarrInstanceOptions : ArrApplicationBaseOptions | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace UmlautAdaptarr.Options | ||
{ | ||
/// <summary> | ||
/// Global options for the UmlautAdaptarr application. | ||
/// </summary> | ||
public class GlobalOptions | ||
{ | ||
/// <summary> | ||
/// The host of the UmlautAdaptarr API. | ||
/// </summary> | ||
public string UmlautAdaptarrApiHost { get; set; } | ||
|
||
/// <summary> | ||
/// The User-Agent string used in HTTP requests. | ||
/// </summary> | ||
public string UserAgent { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace UmlautAdaptarr.Options; | ||
|
||
/// <summary> | ||
/// Represents options for proxy configuration. | ||
/// </summary> | ||
public class Proxy | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether to use a proxy. | ||
/// </summary> | ||
public bool Enabled { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the address of the proxy. | ||
/// </summary> | ||
public string? Address { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the username for proxy authentication. | ||
/// </summary> | ||
public string? Username { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the password for proxy authentication. | ||
/// </summary> | ||
public string? Password { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace UmlautAdaptarr.Options; | ||
|
||
/// <summary> | ||
/// Represents options for proxy configuration. | ||
/// </summary> | ||
public class ProxyOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether to use a proxy. | ||
/// </summary> | ||
public bool Enabled { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the address of the proxy. | ||
/// </summary> | ||
public string? Address { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the username for proxy authentication. | ||
/// </summary> | ||
public string? Username { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the password for proxy authentication. | ||
/// </summary> | ||
public string? Password { get; set; } | ||
|
||
/// <summary> | ||
/// Bypass Local Ip Addresses , Proxy will ignore local Ip Addresses | ||
/// </summary> | ||
public bool BypassOnLocal { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace UmlautAdaptarr.Providers | ||
{ | ||
public static class ArrClientFactory | ||
{ | ||
// TODO, still uses old IConfiguration | ||
// TODO not used yet | ||
public static IEnumerable<TClient> CreateClients<TClient>( | ||
Func<string, TClient> constructor, IConfiguration configuration, string configKey) where TClient : ArrClientBase | ||
{ | ||
var hosts = configuration.GetValue<string>(configKey)?.Split(',') ?? throw new ArgumentException($"{configKey} environment variable must be set if the app is enabled"); | ||
foreach (var host in hosts) | ||
{ | ||
yield return constructor(host.Trim()); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.