mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-20 18:17:54 +02:00
Notification-Thread Implemented
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using API.MangaDownloadClients;
|
||||
using API.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using static System.IO.UnixFileMode;
|
||||
@ -33,6 +34,14 @@ public static class TrangaSettings
|
||||
};
|
||||
public static Dictionary<RequestType, int> requestLimits { get; set; } = DefaultRequestLimits;
|
||||
|
||||
public static TimeSpan NotificationUrgencyDelay(NotificationUrgency urgency) => urgency switch
|
||||
{
|
||||
NotificationUrgency.High => TimeSpan.Zero,
|
||||
NotificationUrgency.Normal => TimeSpan.FromMinutes(5),
|
||||
NotificationUrgency.Low => TimeSpan.FromMinutes(10),
|
||||
_ => TimeSpan.FromHours(1)
|
||||
};
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
if(File.Exists(settingsFilePath))
|
||||
|
Reference in New Issue
Block a user