aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-09-01 18:41:58 -0500
committerJP Dillingham <jp@dillingham.me>2024-09-01 18:41:58 -0500
commit82e1ae5f13aec70548bd7fc98e4d4a35e682f6df (patch)
tree18d567a33d2ee541a2aa4c042984327df748b750 /src/slskd
parentc66f7a23c321b0b110b035df228093722f7c857a (diff)
downloadslskd-82e1ae5f13aec70548bd7fc98e4d4a35e682f6df.tar.gz
subscribe to directory event in shell service
Diffstat (limited to 'src/slskd')
-rw-r--r--src/slskd/Integrations/Shell/ShellService.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slskd/Integrations/Shell/ShellService.cs b/src/slskd/Integrations/Shell/ShellService.cs
index ddb65a53..baed28f8 100644
--- a/src/slskd/Integrations/Shell/ShellService.cs
+++ b/src/slskd/Integrations/Shell/ShellService.cs
@@ -20,6 +20,7 @@ namespace slskd.Integrations.Shell;
using System;
using System.Threading.Tasks;
using Serilog;
+using slskd.Events;
public class ShellService
{
@@ -28,6 +29,7 @@ public class ShellService
Events = eventBus;
Events.Subscribe<DownloadFileCompleteEvent>(nameof(ShellService), HandleDownloadFileCompleteEvent);
+ Events.Subscribe<DownloadDirectoryCompleteEvent>(nameof(ShellService), HandleDownloadDirectoryCompleteEvent);
Log.Debug("Shell service initialized");
}
@@ -39,4 +41,9 @@ public class ShellService
{
Console.WriteLine("here is where we would call an external application!");
}
+
+ private async Task HandleDownloadDirectoryCompleteEvent(DownloadDirectoryCompleteEvent data)
+ {
+ Console.WriteLine("wow we downloaded a whole directory");
+ }
} \ No newline at end of file