From c67223f7b4d4c9f8baa80a9dbf48c8fd69c4c2eb Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 10 Jul 2021 23:46:44 -0500 Subject: fix spacing --- src/slskd/Properties/slskd.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/slskd/Properties') diff --git a/src/slskd/Properties/slskd.yml b/src/slskd/Properties/slskd.yml index 43c87f90..c6876249 100644 --- a/src/slskd/Properties/slskd.yml +++ b/src/slskd/Properties/slskd.yml @@ -55,7 +55,7 @@ # address: ~ # port: ~ # encryption_mode: auto -# ignore_certificate_errors: false +# ignore_certificate_errors: false # username: ~ # password: ~ # remote_path: / @@ -63,10 +63,10 @@ # connection_timeout: 5000 # retry_attempts: 3 # pushbullet: -# enabled: false -# access_token: ~ -# notification_prefix: "From slskd:" -# notify_on_private_message: true -# notify_on_room_mention: true -# retry_attempts: 3 -# cooldown_time: 900000 \ No newline at end of file +# enabled: false +# access_token: ~ +# notification_prefix: "From slskd:" +# notify_on_private_message: true +# notify_on_room_mention: true +# retry_attempts: 3 +# cooldown_time: 900000 \ No newline at end of file -- cgit v1.2.3 From b5167888d9dd6bb74ac632e4559716c7ca433f0f Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 11 Jul 2021 21:40:25 -0500 Subject: update config template --- src/slskd/Properties/slskd.yml | 135 ++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 68 deletions(-) (limited to 'src/slskd/Properties') diff --git a/src/slskd/Properties/slskd.yml b/src/slskd/Properties/slskd.yml index c6876249..938d2a70 100644 --- a/src/slskd/Properties/slskd.yml +++ b/src/slskd/Properties/slskd.yml @@ -1,72 +1,71 @@ -# slskd: -# debug: false -# no_logo: false -# instance_name: default -# web: -# port: 5000 -# https: -# port: 5001 -# force: false -# certificate: -# pfx: ~ -# password: ~ -# url_base: / -# content_path: wwwroot -# authentication: -# disable: false -# username: slskd -# password: slskd -# jwt: -# key: ~ -# ttl: 604800000 -# directories: -# app: ~ -# incomplete: ~ -# downloads: ~ -# shared: ~ -# logger: -# loki: ~ -# feature: -# prometheus: false -# swagger: false -# soulseek: -# username: ~ -# password: ~ -# listen_port: 50000 -# diagnostic_level: Info -# distributed_network: -# disabled: false -# child_limit: 25 -# connection: -# timeout: -# connect: 10000 -# inactivity: 15000 -# buffer: -# read: 16384 -# write: 16384 -# proxy: -# address: ~ -# port: ~ -# username: ~ -# password: ~ -# integration: -# ftp: -# enabled: false +# debug: false +# no_logo: false +# instance_name: default +# web: +# port: 5000 +# https: +# port: 5001 +# force: false +# certificate: +# pfx: ~ +# password: ~ +# url_base: / +# content_path: wwwroot +# authentication: +# disable: false +# username: slskd +# password: slskd +# jwt: +# key: ~ +# ttl: 604800000 +# directories: +# app: ~ +# incomplete: ~ +# downloads: ~ +# shared: ~ +# logger: +# loki: ~ +# feature: +# prometheus: false +# swagger: false +# soulseek: +# username: ~ +# password: ~ +# listen_port: 50000 +# diagnostic_level: Info +# distributed_network: +# disabled: false +# child_limit: 25 +# connection: +# timeout: +# connect: 10000 +# inactivity: 15000 +# buffer: +# read: 16384 +# write: 16384 +# proxy: # address: ~ # port: ~ -# encryption_mode: auto -# ignore_certificate_errors: false # username: ~ # password: ~ -# remote_path: / -# overwrite_existing: true -# connection_timeout: 5000 -# retry_attempts: 3 -# pushbullet: -# enabled: false -# access_token: ~ -# notification_prefix: "From slskd:" -# notify_on_private_message: true -# notify_on_room_mention: true -# retry_attempts: 3 -# cooldown_time: 900000 \ No newline at end of file +# integration: +# ftp: +# enabled: false +# address: ~ +# port: ~ +# encryption_mode: auto +# ignore_certificate_errors: false +# username: ~ +# password: ~ +# remote_path: / +# overwrite_existing: true +# connection_timeout: 5000 +# retry_attempts: 3 +# pushbullet: +# enabled: false +# access_token: ~ +# notification_prefix: "From slskd:" +# notify_on_private_message: true +# notify_on_room_mention: true +# retry_attempts: 3 +# cooldown_time: 900000 \ No newline at end of file -- cgit v1.2.3 From 3f5ebfde9be34a80a28dc8c08efaa4c9417184dc Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 14 Jul 2021 08:39:15 -0500 Subject: simplify using for microsoft Options --- src/slskd/Application/Management/ManagementService.cs | 6 ++++-- .../Application/Transfer/API/Controllers/TransfersController.cs | 4 +++- src/slskd/Integrations/FTP/FTPClientFactory.cs | 4 +++- src/slskd/Integrations/FTP/FTPService.cs | 4 +++- src/slskd/Integrations/Pushbullet/PushbulletService.cs | 4 +++- src/slskd/Properties/analysis.ruleset | 1 + 6 files changed, 17 insertions(+), 6 deletions(-) (limited to 'src/slskd/Properties') diff --git a/src/slskd/Application/Management/ManagementService.cs b/src/slskd/Application/Management/ManagementService.cs index 4a385cff..7bcdc7be 100644 --- a/src/slskd/Application/Management/ManagementService.cs +++ b/src/slskd/Application/Management/ManagementService.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // +using Microsoft.Extensions.Options; + namespace slskd.Management { using System; @@ -32,7 +34,7 @@ namespace slskd.Management /// The options monitor used to derive application options. /// The Soulseek client. public ManagementService( - Microsoft.Extensions.Options.IOptionsMonitor optionsMonitor, + IOptionsMonitor optionsMonitor, ISoulseekClient soulseekClient) { OptionsMonitor = optionsMonitor; @@ -41,7 +43,7 @@ namespace slskd.Management private ISoulseekClient Client { get; } private Options Options => OptionsMonitor.CurrentValue; - private Microsoft.Extensions.Options.IOptionsMonitor OptionsMonitor { get; } + private IOptionsMonitor OptionsMonitor { get; } /// /// Connects the Soulseek client to the server using the configured username and password. diff --git a/src/slskd/Application/Transfer/API/Controllers/TransfersController.cs b/src/slskd/Application/Transfer/API/Controllers/TransfersController.cs index 97b86689..9ed36d1b 100644 --- a/src/slskd/Application/Transfer/API/Controllers/TransfersController.cs +++ b/src/slskd/Application/Transfer/API/Controllers/TransfersController.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // +using Microsoft.Extensions.Options; + namespace slskd.Transfer.API { using System; @@ -46,7 +48,7 @@ namespace slskd.Transfer.API /// /// public TransfersController( - Microsoft.Extensions.Options.IOptionsSnapshot options, + IOptionsSnapshot options, ISoulseekClient client, ITransferTracker tracker, IFTPService ftpClient) diff --git a/src/slskd/Integrations/FTP/FTPClientFactory.cs b/src/slskd/Integrations/FTP/FTPClientFactory.cs index cc076ca1..7c55195f 100644 --- a/src/slskd/Integrations/FTP/FTPClientFactory.cs +++ b/src/slskd/Integrations/FTP/FTPClientFactory.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // +using Microsoft.Extensions.Options; + namespace slskd.Integrations.FTP { using System; @@ -30,7 +32,7 @@ namespace slskd.Integrations.FTP /// Initializes a new instance of the class. /// /// The options monitor used to derive application options. - public FTPClientFactory(Microsoft.Extensions.Options.IOptionsMonitor optionsMonitor) + public FTPClientFactory(IOptionsMonitor optionsMonitor) { Options = optionsMonitor.CurrentValue; diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs index a5fe6a8f..4b3f45ce 100644 --- a/src/slskd/Integrations/FTP/FTPService.cs +++ b/src/slskd/Integrations/FTP/FTPService.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // +using Microsoft.Extensions.Options; + namespace slskd.Integrations.FTP { using System; @@ -38,7 +40,7 @@ namespace slskd.Integrations.FTP /// The logger. public FTPService( IFTPClientFactory ftpClientFactory, - Microsoft.Extensions.Options.IOptionsMonitor optionsMonitor, + IOptionsMonitor optionsMonitor, ILogger log) { Factory = ftpClientFactory; diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs index cb31e6dc..04994d92 100644 --- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs +++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // +using Microsoft.Extensions.Options; + namespace slskd.Integrations.Pushbullet { using System; @@ -41,7 +43,7 @@ namespace slskd.Integrations.Pushbullet /// The logger. public PushbulletService( IHttpClientFactory httpClientFactory, - Microsoft.Extensions.Options.IOptionsMonitor optionsMonitor, + IOptionsMonitor optionsMonitor, ILogger log) { HttpClientFactory = httpClientFactory; diff --git a/src/slskd/Properties/analysis.ruleset b/src/slskd/Properties/analysis.ruleset index 09e99d9e..4e4ae5cf 100644 --- a/src/slskd/Properties/analysis.ruleset +++ b/src/slskd/Properties/analysis.ruleset @@ -45,6 +45,7 @@ + -- cgit v1.2.3