mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-09 09:47:15 -04:00
* 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
20 lines
600 B
C#
20 lines
600 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace Infrastructure.Verticals.DownloadClient.Deluge.Extensions;
|
|
|
|
internal static class DelugeExtensions
|
|
{
|
|
public static List<String?> GetAllJsonPropertyFromType(this Type t)
|
|
{
|
|
var type = typeof(JsonPropertyAttribute);
|
|
var props = t.GetProperties()
|
|
.Where(prop => Attribute.IsDefined(prop, type))
|
|
.ToList();
|
|
|
|
return props
|
|
.Select(x => x.GetCustomAttributes(type, true).Single())
|
|
.Cast<JsonPropertyAttribute>()
|
|
.Select(x => x.PropertyName)
|
|
.ToList();
|
|
}
|
|
} |