diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-09-22 16:54:42 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-09-22 16:54:42 -0500 |
| commit | a01994b6c6dd2a798cf2fe23706dacb894c807c1 (patch) | |
| tree | 9a5c93c8a51f83959fc4d5e30027aea29da09e14 /src | |
| parent | 1eb7649c460518bbedae2bc25fae120b9faf8157 (diff) | |
| download | slskd-a01994b6c6dd2a798cf2fe23706dacb894c807c1.tar.gz | |
remove (temporarily) ShellService
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Integrations/Shell/ShellService.cs | 49 | ||||
| -rw-r--r-- | src/slskd/Program.cs | 7 |
2 files changed, 0 insertions, 56 deletions
diff --git a/src/slskd/Integrations/Shell/ShellService.cs b/src/slskd/Integrations/Shell/ShellService.cs deleted file mode 100644 index baed28f8..00000000 --- a/src/slskd/Integrations/Shell/ShellService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// <copyright file="ShellService.cs" company="slskd Team"> -// Copyright (c) slskd Team. All rights reserved. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see https://www.gnu.org/licenses/. -// </copyright> - -namespace slskd.Integrations.Shell; - -using System; -using System.Threading.Tasks; -using Serilog; -using slskd.Events; - -public class ShellService -{ - public ShellService(EventBus eventBus) - { - Events = eventBus; - - Events.Subscribe<DownloadFileCompleteEvent>(nameof(ShellService), HandleDownloadFileCompleteEvent); - Events.Subscribe<DownloadDirectoryCompleteEvent>(nameof(ShellService), HandleDownloadDirectoryCompleteEvent); - - Log.Debug("Shell service initialized"); - } - - private ILogger Log { get; } = Serilog.Log.ForContext<ShellService>(); - private EventBus Events { get; } - - private async Task HandleDownloadFileCompleteEvent(DownloadFileCompleteEvent data) - { - 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 diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 93734a35..2d62efd8 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -57,11 +57,9 @@ namespace slskd using slskd.Core.API; using slskd.Cryptography; using slskd.Events; - using slskd.Files; using slskd.Integrations.FTP; using slskd.Integrations.Pushbullet; - using slskd.Integrations.Shell; using slskd.Messaging; using slskd.Relay; using slskd.Search; @@ -486,9 +484,6 @@ namespace slskd var app = builder.Build(); - // hack: nothing depends on ShellService but we need to initialize it - _ = app.Services.GetService<ShellService>(); - app.ConfigureAspDotNetPipeline(); if (OptionsAtStartup.Flags.NoStart) @@ -605,8 +600,6 @@ namespace slskd services.AddSingleton<IRelayService, RelayService>(); - services.AddSingleton<ShellService>(); - services.AddSingleton<IFTPClientFactory, FTPClientFactory>(); services.AddSingleton<IFTPService, FTPService>(); |
