mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-05-17 07:22:13 +00:00
- Added retry delay for rate limit handling - Added toggle to control whether auto refresh also adds missing episodes to the queue - Added configurable delay after each dub download - Changed encoding preset dialog to show a preview of the FFmpeg command - Changed play sound on queue empty and execute file on completion to be handled by the notification service - Changed shutdown PC option to disable once triggered - Fixed crash with queue persistence - Fixed crash with audio player - Fixed subscription countdown on the account page
25 lines
710 B
C#
25 lines
710 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace CRD.Utils.Notifications;
|
|
|
|
public class NotificationSettings{
|
|
[JsonProperty("providers")]
|
|
public List<NotificationProviderConfig> Providers{ get; set; } = [];
|
|
|
|
public NotificationProviderConfig GetOrCreateProvider(NotificationProviderType type){
|
|
var provider = Providers.FirstOrDefault(p => p.Type == type);
|
|
if (provider != null){
|
|
provider.Events ??= [];
|
|
provider.Headers ??= [];
|
|
return provider;
|
|
}
|
|
|
|
provider = new NotificationProviderConfig{
|
|
Type = type
|
|
};
|
|
Providers.Add(provider);
|
|
return provider;
|
|
}
|
|
}
|