Abstracted & unified indexer config logic (logins are now saved), implemented indexer config migrations, fixed nCore implementation

This commit is contained in:
unknown
2015-08-03 15:38:45 -06:00
parent 5dc7ebaba5
commit 0a8d9d3447
54 changed files with 869 additions and 740 deletions

View File

@@ -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)
})