From a01994b6c6dd2a798cf2fe23706dacb894c807c1 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 22 Sep 2024 16:54:42 -0500 Subject: remove (temporarily) ShellService --- src/slskd/Integrations/Shell/ShellService.cs | 49 ---------------------------- src/slskd/Program.cs | 7 ---- 2 files changed, 56 deletions(-) delete mode 100644 src/slskd/Integrations/Shell/ShellService.cs (limited to 'src') 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 (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/. -// - -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(nameof(ShellService), HandleDownloadFileCompleteEvent); - Events.Subscribe(nameof(ShellService), HandleDownloadDirectoryCompleteEvent); - - Log.Debug("Shell service initialized"); - } - - private ILogger Log { get; } = Serilog.Log.ForContext(); - 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(); - app.ConfigureAspDotNetPipeline(); if (OptionsAtStartup.Flags.NoStart) @@ -605,8 +600,6 @@ namespace slskd services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); services.AddSingleton(); -- cgit v1.2.3