aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-03-15 15:32:35 -0500
committerJP Dillingham <jp@dillingham.me>2026-03-15 15:32:35 -0500
commit83d10be53819a2185e8dc514e96ea6f76f87aa60 (patch)
tree3b0d324850365a1ac1cc885257e920440f5410e7 /src/slskd/Integrations
parent1defeecb62616cad13bdcf2c5c1f1f7e2f5254cb (diff)
downloadslskd-83d10be53819a2185e8dc514e96ea6f76f87aa60.tar.gz
also rename integrations while we're at it
Diffstat (limited to 'src/slskd/Integrations')
-rw-r--r--src/slskd/Integrations/FTP/FTPClientFactory.cs4
-rw-r--r--src/slskd/Integrations/FTP/FTPService.cs4
-rw-r--r--src/slskd/Integrations/Pushbullet/PushbulletService.cs4
-rw-r--r--src/slskd/Integrations/Scripts/ScriptService.cs2
-rw-r--r--src/slskd/Integrations/VPN/Clients/Gluetun.cs6
-rw-r--r--src/slskd/Integrations/VPN/VPNService.cs8
-rw-r--r--src/slskd/Integrations/Webhooks/WebhookService.cs2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/slskd/Integrations/FTP/FTPClientFactory.cs b/src/slskd/Integrations/FTP/FTPClientFactory.cs
index 9e5dfc2e..13f78554 100644
--- a/src/slskd/Integrations/FTP/FTPClientFactory.cs
+++ b/src/slskd/Integrations/FTP/FTPClientFactory.cs
@@ -20,7 +20,7 @@ using Microsoft.Extensions.Options;
namespace slskd.Integrations.FTP
{
using FluentFTP;
- using static slskd.Options.IntegrationOptions;
+ using static slskd.Options.IntegrationsOptions;
/// <summary>
/// FTP client factory.
@@ -36,7 +36,7 @@ namespace slskd.Integrations.FTP
OptionsMonitor = optionsMonitor;
}
- private FtpOptions FtpOptions => OptionsMonitor.CurrentValue.Integration.Ftp;
+ private FtpOptions FtpOptions => OptionsMonitor.CurrentValue.Integrations.Ftp;
private IOptionsMonitor<Options> OptionsMonitor { get; set; }
/// <summary>
diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs
index ebf34708..81defaaa 100644
--- a/src/slskd/Integrations/FTP/FTPService.cs
+++ b/src/slskd/Integrations/FTP/FTPService.cs
@@ -26,7 +26,7 @@ namespace slskd.Integrations.FTP
using FluentFTP;
using FluentFTP.Exceptions;
using Microsoft.Extensions.Logging;
- using static slskd.Options.IntegrationOptions;
+ using static slskd.Options.IntegrationsOptions;
/// <summary>
/// FTP Integration service.
@@ -50,7 +50,7 @@ namespace slskd.Integrations.FTP
}
private IFTPClientFactory Factory { get; set; }
- private FtpOptions FtpOptions => OptionsMonitor.CurrentValue.Integration.Ftp;
+ private FtpOptions FtpOptions => OptionsMonitor.CurrentValue.Integrations.Ftp;
private ILogger<FTPService> Log { get; set; }
private IOptionsMonitor<Options> OptionsMonitor { get; }
diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
index 4c9df98c..2f24befd 100644
--- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs
+++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
@@ -26,7 +26,7 @@ namespace slskd.Integrations.Pushbullet
using System.Threading.Tasks;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging;
- using static slskd.Options.IntegrationOptions;
+ using static slskd.Options.IntegrationsOptions;
/// <summary>
/// Pushbullet integration service.
@@ -57,7 +57,7 @@ namespace slskd.Integrations.Pushbullet
private IHttpClientFactory HttpClientFactory { get; }
private ILogger<PushbulletService> Log { get; }
private IOptionsMonitor<Options> OptionsMonitor { get; }
- private PushbulletOptions PushbulletOptions => OptionsMonitor.CurrentValue.Integration.Pushbullet;
+ private PushbulletOptions PushbulletOptions => OptionsMonitor.CurrentValue.Integrations.Pushbullet;
private IMemoryCache RecentlySent { get; }
/// <summary>
diff --git a/src/slskd/Integrations/Scripts/ScriptService.cs b/src/slskd/Integrations/Scripts/ScriptService.cs
index f5cc4d4c..9b47afe7 100644
--- a/src/slskd/Integrations/Scripts/ScriptService.cs
+++ b/src/slskd/Integrations/Scripts/ScriptService.cs
@@ -88,7 +88,7 @@ public class ScriptService
bool EqualsLiterallyAnyEvent(string type) => type.Equals(EventType.Any.ToString(), StringComparison.OrdinalIgnoreCase);
var options = OptionsMonitor.CurrentValue;
- var scriptsTriggeredByThisEventType = options.Integration.Scripts
+ var scriptsTriggeredByThisEventType = options.Integrations.Scripts
.Where(kvp => kvp.Value.On.Any(EqualsThisEvent) || kvp.Value.On.Any(EqualsLiterallyAnyEvent));
foreach (var script in scriptsTriggeredByThisEventType)
diff --git a/src/slskd/Integrations/VPN/Clients/Gluetun.cs b/src/slskd/Integrations/VPN/Clients/Gluetun.cs
index d22c15f7..136c9c05 100644
--- a/src/slskd/Integrations/VPN/Clients/Gluetun.cs
+++ b/src/slskd/Integrations/VPN/Clients/Gluetun.cs
@@ -26,7 +26,7 @@ using System.Net.Http.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Serilog;
-using static slskd.Options.IntegrationOptions.VpnOptions;
+using static slskd.Options.IntegrationsOptions.VpnOptions;
/// <summary>
/// Gluetun VPN client.
@@ -47,7 +47,7 @@ public class Gluetun : IVPNClient
private ILogger Log { get; } = Serilog.Log.ForContext<Gluetun>();
private IHttpClientFactory HttpClientFactory { get; }
private IOptionsMonitor<Options> OptionsMonitor { get; }
- private GluetunVpnOptions Options => OptionsMonitor.CurrentValue.Integration.Vpn.Gluetun;
+ private GluetunVpnOptions Options => OptionsMonitor.CurrentValue.Integrations.Vpn.Gluetun;
/// <summary>
/// Fetch the VPN connection status from the Gluetun control server.
@@ -85,7 +85,7 @@ public class Gluetun : IVPNClient
int? port = null;
- if (OptionsMonitor.CurrentValue.Integration.Vpn.PortForwarding)
+ if (OptionsMonitor.CurrentValue.Integrations.Vpn.PortForwarding)
{
port = (await MakeRequest<GluetunPortForwardResponse>(http, "/v1/portforward"))?.Port;
diff --git a/src/slskd/Integrations/VPN/VPNService.cs b/src/slskd/Integrations/VPN/VPNService.cs
index db09c041..c0a65f00 100644
--- a/src/slskd/Integrations/VPN/VPNService.cs
+++ b/src/slskd/Integrations/VPN/VPNService.cs
@@ -52,9 +52,9 @@ public class VPNService : IDisposable
SoulseekClient = soulseekClient;
HttpClientFactory = httpClientFactory;
- if (OptionsAtStartup.Integration.Vpn.Enabled)
+ if (OptionsAtStartup.Integrations.Vpn.Enabled)
{
- Timer = new System.Timers.Timer(interval: OptionsAtStartup.Integration.Vpn.PollingInterval)
+ Timer = new System.Timers.Timer(interval: OptionsAtStartup.Integrations.Vpn.PollingInterval)
{
AutoReset = true,
};
@@ -63,7 +63,7 @@ public class VPNService : IDisposable
// detect VPN based on the configuration provided; this logic will determine the order
// we can revisit this if/when we add other options besides gluetun
- if (!string.IsNullOrEmpty(OptionsMonitor.CurrentValue.Integration.Vpn.Gluetun.Url))
+ if (!string.IsNullOrEmpty(OptionsMonitor.CurrentValue.Integrations.Vpn.Gluetun.Url))
{
Client = new Gluetun(HttpClientFactory, OptionsMonitor);
@@ -154,7 +154,7 @@ public class VPNService : IDisposable
throw new VPNClientException("VPN client not properly initialized; something went seriously wrong! Please report to GitHub.");
}
- var options = OptionsMonitor.CurrentValue.Integration.Vpn;
+ var options = OptionsMonitor.CurrentValue.Integrations.Vpn;
bool isReadyNow = false;
VPNStatus status = new VPNStatus();
diff --git a/src/slskd/Integrations/Webhooks/WebhookService.cs b/src/slskd/Integrations/Webhooks/WebhookService.cs
index 8a009623..deff3368 100644
--- a/src/slskd/Integrations/Webhooks/WebhookService.cs
+++ b/src/slskd/Integrations/Webhooks/WebhookService.cs
@@ -73,7 +73,7 @@ public class WebhookService
bool EqualsLiterallyAnyEvent(string type) => type.Equals(EventType.Any.ToString(), StringComparison.OrdinalIgnoreCase);
var options = OptionsMonitor.CurrentValue;
- var webhooksTriggeredByThisEventType = options.Integration.Webhooks
+ var webhooksTriggeredByThisEventType = options.Integrations.Webhooks
.Where(kvp => kvp.Value.On.Any(EqualsThisEvent) || kvp.Value.On.Any(EqualsLiterallyAnyEvent));
foreach (var webhook in webhooksTriggeredByThisEventType)