add content blocker (#5)

* refactored code
added deluge support
added transmission support
added content blocker
added blacklist and whitelist

* increased level on some logs; updated test docker compose; updated dev appsettings

* updated docker compose and readme

* moved some logs

* fixed env var typo; fixed sonarr and radarr default download client
This commit is contained in:
Marius Nechifor
2024-11-18 20:08:01 +02:00
committed by GitHub
parent b323cb40ae
commit e0a6c7842b
154 changed files with 4752 additions and 789 deletions
+32 -5
View File
@@ -1,12 +1,39 @@
namespace Common.Configuration;
using System.ComponentModel.DataAnnotations;
public sealed class QBitConfig
namespace Common.Configuration;
public sealed class QBitConfig : IConfig
{
public const string SectionName = "qBittorrent";
public required Uri Url { get; set; }
public required bool Enabled { get; init; }
public required string Username { get; set; }
public Uri? Url { get; init; }
public required string Password { get; set; }
public string? Username { get; init; }
public string? Password { get; init; }
public void Validate()
{
if (!Enabled)
{
return;
}
if (Url is null)
{
throw new ArgumentNullException(nameof(Url));
}
if (string.IsNullOrEmpty(Username))
{
throw new ArgumentNullException(nameof(Username));
}
if (string.IsNullOrEmpty(Password))
{
throw new ArgumentNullException(nameof(Password));
}
}
}