From cc06d0f0f83fe3f9313a9e9e91e3cca9b8db7cf3 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 6 Sep 2022 21:59:39 -0500 Subject: add ConnectionStrings record --- src/slskd/Core/ConnectionStrings.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/slskd/Core/ConnectionStrings.cs (limited to 'src/slskd/Core') diff --git a/src/slskd/Core/ConnectionStrings.cs b/src/slskd/Core/ConnectionStrings.cs new file mode 100644 index 00000000..e5bd4f05 --- /dev/null +++ b/src/slskd/Core/ConnectionStrings.cs @@ -0,0 +1,29 @@ +// +// 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 +{ + /// + /// Application connection strings. + /// + public record ConnectionStrings + { + public string Transfers { get; init; } + public string Shares { get; init; } + public string Search { get; init; } + } +} -- cgit v1.2.3 From f8d129bb570af056e9646582089895ad7f775faa Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 7 Sep 2022 22:21:19 -0500 Subject: add Filenames --- src/slskd/Core/Filenames.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/slskd/Core/Filenames.cs (limited to 'src/slskd/Core') diff --git a/src/slskd/Core/Filenames.cs b/src/slskd/Core/Filenames.cs new file mode 100644 index 00000000..0fc55fc5 --- /dev/null +++ b/src/slskd/Core/Filenames.cs @@ -0,0 +1,30 @@ +// +// 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 +{ + /// + /// Application files. + /// + public static class Filenames + { + public static readonly string TransfersDb = "transfers.db"; + public static readonly string SharesDb = "shares.db"; + public static readonly string SearchDb = "search.db"; + public static readonly string BrowseCache = "browse.cache"; + } +} -- cgit v1.2.3 From a8ea5d661f2cffb36245f6c166263c6538fb7361 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 8 Sep 2022 21:29:03 -0500 Subject: add Ready state --- src/slskd/Core/State.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/slskd/Core') diff --git a/src/slskd/Core/State.cs b/src/slskd/Core/State.cs index a1da2be8..1b798ad3 100644 --- a/src/slskd/Core/State.cs +++ b/src/slskd/Core/State.cs @@ -102,6 +102,7 @@ namespace slskd { public bool ScanPending { get; init; } public bool Scanning { get; init; } + public bool Ready { get; init; } public bool Faulted { get; init; } public double ScanProgress { get; init; } public int Directories { get; init; } -- cgit v1.2.3 From c527a1f6f6c2f28a4f2775c5d76d844a843762a9 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 10 Sep 2022 11:39:51 -0500 Subject: fix a bug preventing swagger from working --- src/slskd/Core/Options.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/slskd/Core') diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 259977b6..d6d4b04c 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -755,12 +755,12 @@ namespace slskd /// Gets metrics endpoint authentication options. /// [Validate] - public AuthenticationOptions Authentication { get; init; } = new AuthenticationOptions(); + public MetricsAuthenticationOptions Authentication { get; init; } = new MetricsAuthenticationOptions(); /// /// Metrics endpoint authentication options. /// - public class AuthenticationOptions + public class MetricsAuthenticationOptions { /// /// Gets a value indicating whether authentication should be disabled. @@ -1114,12 +1114,12 @@ namespace slskd /// Gets authentication options. /// [Validate] - public AuthenticationOptions Authentication { get; init; } = new AuthenticationOptions(); + public WebAuthenticationOptions Authentication { get; init; } = new WebAuthenticationOptions(); /// /// Authentication options. /// - public class AuthenticationOptions + public class WebAuthenticationOptions { /// /// Gets a value indicating whether authentication should be disabled. -- cgit v1.2.3