mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Abstracted & unified indexer config logic (logins are now saved), implemented indexer config migrations, fixed nCore implementation
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -24,6 +25,11 @@ namespace Jackett.Utils
|
||||
return Encoding.UTF8.GetString(Convert.FromBase64String(str));
|
||||
}
|
||||
|
||||
public static string PostDataFromDict(IEnumerable<KeyValuePair<string, string>> dict)
|
||||
{
|
||||
return new FormUrlEncodedContent(dict).ReadAsStringAsync().Result;
|
||||
}
|
||||
|
||||
public static string Hash(string input)
|
||||
{
|
||||
// Use input string to calculate MD5 hash
|
||||
@@ -46,7 +52,8 @@ namespace Jackett.Utils
|
||||
var properties = exception.GetType()
|
||||
.GetProperties();
|
||||
var fields = properties
|
||||
.Select(property => new {
|
||||
.Select(property => new
|
||||
{
|
||||
Name = property.Name,
|
||||
Value = property.GetValue(exception, null)
|
||||
})
|
||||
|
Reference in New Issue
Block a user