mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-11 13:19:48 +02:00
Add Controller
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using API.MangaDownloadClients;
|
||||
using API.Workers;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace API;
|
||||
|
||||
@@ -63,12 +64,12 @@ public struct TrangaSettings()
|
||||
{
|
||||
if (!File.Exists(SettingsFilePath))
|
||||
new TrangaSettings().Save();
|
||||
return JsonConvert.DeserializeObject<TrangaSettings>(File.ReadAllText(SettingsFilePath));
|
||||
return JsonConvert.DeserializeObject<TrangaSettings>(File.ReadAllText(SettingsFilePath), new StringEnumConverter());
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
File.WriteAllText(SettingsFilePath, JsonConvert.SerializeObject(this, Formatting.Indented));
|
||||
File.WriteAllText(SettingsFilePath, JsonConvert.SerializeObject(this, Formatting.Indented, new StringEnumConverter()));
|
||||
}
|
||||
|
||||
public void SetUserAgent(string value)
|
||||
|
Reference in New Issue
Block a user