From bd6ed779fb1de4f1388b40bf819907291d78d367 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 2 Jun 2024 11:10:37 -0500 Subject: fix typos --- src/slskd/Application.cs | 10 +++++----- src/slskd/Common/CommonExtensions.cs | 8 ++++---- .../Configuration/CommandLineConfigurationSource.cs | 2 +- .../EnvironmentVariableConfigurationSource.cs | 4 ++-- .../Configuration/RequiresReconnectAttribute.cs | 3 +++ .../Common/Configuration/RequiresRestartAttribute.cs | 3 +++ src/slskd/Common/Exceptions/OutOfRangeException.cs | 1 - src/slskd/Common/Exceptions/RetryException.cs | 2 +- src/slskd/Common/Exceptions/SlskdException.cs | 2 +- src/slskd/Common/ManagedState.cs | 6 +++--- src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs | 2 +- src/slskd/Common/Retry.cs | 2 +- src/slskd/Common/Validation/EnumAttribute.cs | 2 +- src/slskd/Common/Validation/ValidationExtensions.cs | 2 +- src/slskd/Common/Waiter.cs | 4 ++-- src/slskd/Core/Blacklist.cs | 6 +++--- src/slskd/Core/Metrics.cs | 2 +- src/slskd/Core/Options.cs | 4 ++-- src/slskd/Files/FileService.cs | 2 +- .../API/Controllers/ConversationsController.cs | 20 ++++++++++---------- src/slskd/Messaging/RoomService.cs | 4 ++-- src/slskd/Program.cs | 4 ++-- src/slskd/Relay/NullRelayClient.cs | 2 +- src/slskd/Relay/RelayService.cs | 4 ++-- src/slskd/Search/ISearchService.cs | 4 ++-- src/slskd/Search/SearchService.cs | 4 ++-- src/slskd/Shares/IShareRepository.cs | 2 +- src/slskd/Shares/ShareService.cs | 4 ++-- src/slskd/Shares/SoulseekFileFactory.cs | 2 +- src/slskd/Shares/SqliteShareRepository.cs | 4 ++-- .../Transfers/API/Controllers/TransfersController.cs | 10 +++++----- src/slskd/Transfers/Uploads/UploadQueue.cs | 2 +- src/slskd/Users/UserService.cs | 4 ++-- 33 files changed, 71 insertions(+), 66 deletions(-) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index f92b4647..65751553 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -164,7 +164,7 @@ namespace slskd Client.BrowseProgressUpdated += Client_BrowseProgressUpdated; Client.UserStatusChanged += Client_UserStatusChanged; - Client.PrivateMessageReceived += Client_PrivateMessageRecieved; + Client.PrivateMessageReceived += Client_PrivateMessageReceived; Client.PrivateRoomMembershipAdded += (e, room) => Log.Information("Added to private room {Room}", room); Client.PrivateRoomMembershipRemoved += (e, room) => Log.Information("Removed from private room {Room}", room); @@ -863,13 +863,13 @@ namespace slskd // we previously saved a list of all of the download ids that were active at the previous shutdown; fetch the latest // record for those transfers from the db and ensure they haven't been removed from the UI while the application was offline // the user doesn't want those transfers anymore and we don't want to add them back. - var resumeableDownloads = Transfers.Downloads.List(t => !t.Removed && ActiveDownloadIdsAtPreviousShutdown.Contains(t.Id)); + var resumableDownloads = Transfers.Downloads.List(t => !t.Removed && ActiveDownloadIdsAtPreviousShutdown.Contains(t.Id)); - if (resumeableDownloads.Any()) + if (resumableDownloads.Any()) { Log.Information("Attempting to re-enqueue previously active downloads..."); - var groups = resumeableDownloads.GroupBy(d => d.Username); + var groups = resumableDownloads.GroupBy(d => d.Username); // re-request downloads. we use a try/catch here because there's a very good chance that the other user is offline. foreach (var group in groups) @@ -897,7 +897,7 @@ namespace slskd } } - private void Client_PrivateMessageRecieved(object sender, PrivateMessageReceivedEventArgs args) + private void Client_PrivateMessageReceived(object sender, PrivateMessageReceivedEventArgs args) { Messaging.Conversations.HandleMessageAsync(args.Username, PrivateMessage.FromEventArgs(args)); diff --git a/src/slskd/Common/CommonExtensions.cs b/src/slskd/Common/CommonExtensions.cs index 6a472b9b..a68ce2f2 100644 --- a/src/slskd/Common/CommonExtensions.cs +++ b/src/slskd/Common/CommonExtensions.cs @@ -209,7 +209,7 @@ namespace slskd } /// - /// Replaces the first occurance of in the string with . + /// Replaces the first occurrence of in the string with . /// /// The string on which to perform the replacement. /// The phrase or substring to replace. @@ -307,7 +307,7 @@ namespace slskd /// /// The type to which to deserialize the string. /// The string to deserialize. - /// The new object deserialzied from the string. + /// The new object deserialized from the string. public static T FromYaml(this string str) => new DeserializerBuilder() .WithNamingConvention(UnderscoredNamingConvention.Instance) .Build() @@ -401,7 +401,7 @@ namespace slskd } /// - /// Replaces any occurance of an invalid filename character with the specified . + /// Replaces any occurrence of an invalid filename character with the specified . /// /// The path to sanitize. /// The character with which to replace invalid characters. @@ -451,7 +451,7 @@ namespace slskd /// /// The type to which to deserialize the string. /// The string to deserialize. - /// The new object deserialzied from the string. + /// The new object deserialized from the string. public static T FromJson(this string str) => JsonSerializer.Deserialize(str, GetJsonSerializerOptions()); private static JsonSerializerOptions GetJsonSerializerOptions() diff --git a/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs b/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs index 96d8d623..8aa31242 100644 --- a/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs +++ b/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs @@ -30,7 +30,7 @@ namespace slskd.Configuration public static class CommandLineConfigurationExtensions { /// - /// Adds a command line argument configuration soruce to . + /// Adds a command line argument configuration source to . /// /// The to which to add. /// The type from which to map properties. diff --git a/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs b/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs index 6d2896c2..7049050d 100644 --- a/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs +++ b/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs @@ -55,7 +55,7 @@ namespace slskd.Configuration } /// - /// Adds an enviroment variable configuration source to . + /// Adds an environment variable configuration source to . /// /// The to which to add. /// Configures the source. @@ -65,7 +65,7 @@ namespace slskd.Configuration } /// - /// An enviroment variable . + /// An environment variable . /// public class EnvironmentVariableConfigurationProvider : ConfigurationProvider { diff --git a/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs b/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs index cd5edd14..216c0399 100644 --- a/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs +++ b/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs @@ -19,6 +19,9 @@ namespace slskd.Configuration { using System; + /// + /// Indicates that the application must disconnect and reconnect to the Soulseek server for changes to take effect. + /// [AttributeUsage(AttributeTargets.Property)] public class RequiresReconnectAttribute : Attribute { diff --git a/src/slskd/Common/Configuration/RequiresRestartAttribute.cs b/src/slskd/Common/Configuration/RequiresRestartAttribute.cs index 9b90eabe..9f94eb4f 100644 --- a/src/slskd/Common/Configuration/RequiresRestartAttribute.cs +++ b/src/slskd/Common/Configuration/RequiresRestartAttribute.cs @@ -19,6 +19,9 @@ namespace slskd.Configuration { using System; + /// + /// Indicates that the application must be restarted for any changes to take effect. + /// [AttributeUsage(AttributeTargets.Property)] public class RequiresRestartAttribute : Attribute { diff --git a/src/slskd/Common/Exceptions/OutOfRangeException.cs b/src/slskd/Common/Exceptions/OutOfRangeException.cs index 3eb3ab6d..2ee562af 100644 --- a/src/slskd/Common/Exceptions/OutOfRangeException.cs +++ b/src/slskd/Common/Exceptions/OutOfRangeException.cs @@ -19,7 +19,6 @@ namespace slskd { using System; using System.Diagnostics.CodeAnalysis; - using System.Runtime.Serialization; /// /// Represents errors that originate when a value falls out of an expected range. diff --git a/src/slskd/Common/Exceptions/RetryException.cs b/src/slskd/Common/Exceptions/RetryException.cs index 3adadd2e..582c76d2 100644 --- a/src/slskd/Common/Exceptions/RetryException.cs +++ b/src/slskd/Common/Exceptions/RetryException.cs @@ -21,7 +21,7 @@ namespace slskd using System.Diagnostics.CodeAnalysis; /// - /// Represents erorrs that originate while attempting to execute retry logic. + /// Represents errors that originate while attempting to execute retry logic. /// [ExcludeFromCodeCoverage] public class RetryException : Exception diff --git a/src/slskd/Common/Exceptions/SlskdException.cs b/src/slskd/Common/Exceptions/SlskdException.cs index 22676161..db5131c9 100644 --- a/src/slskd/Common/Exceptions/SlskdException.cs +++ b/src/slskd/Common/Exceptions/SlskdException.cs @@ -21,7 +21,7 @@ namespace slskd using System.Diagnostics.CodeAnalysis; /// - /// Represents erorrs that originate from slskd logic. + /// Represents errors that originate from slskd logic. /// [ExcludeFromCodeCoverage] public class SlskdException : Exception diff --git a/src/slskd/Common/ManagedState.cs b/src/slskd/Common/ManagedState.cs index bf6565db..3e439030 100644 --- a/src/slskd/Common/ManagedState.cs +++ b/src/slskd/Common/ManagedState.cs @@ -35,7 +35,7 @@ namespace slskd /// /// Registers a listener to be called whenever the tracked state changes. /// - /// Registers a listener to be called whenver state changes. + /// Registers a listener to be called whenever state changes. /// An which should be disposed to stop listening for changes. IDisposable OnChange(Action<(T Previous, T Current)> listener); } @@ -164,9 +164,9 @@ namespace slskd private object Lock { get; } = new object(); /// - /// Registers a listener to be called whenever the stracked state changes. + /// Registers a listener to be called whenever the tracked state changes. /// - /// Registers a listener to be called whenver state changes. + /// Registers a listener to be called whenever state changes. /// An which should be disposed to stop listening for changes. public IDisposable OnChange(Action<(T Previous, T Current)> listener) { diff --git a/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs b/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs index 4b90d6da..a276bdea 100644 --- a/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs +++ b/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs @@ -66,7 +66,7 @@ namespace slskd private RequestDelegate Next { get; } /// - /// Executes this middleware, returning the contents of the requested HTML file with the specified replacesments made. + /// Executes this middleware, returning the contents of the requested HTML file with the specified replacements made. /// /// /// diff --git a/src/slskd/Common/Retry.cs b/src/slskd/Common/Retry.cs index 2f7b24cd..300c1c51 100644 --- a/src/slskd/Common/Retry.cs +++ b/src/slskd/Common/Retry.cs @@ -53,7 +53,7 @@ namespace slskd /// A function returning a value indicating whether the last Exception is retryable. /// An action to execute on failure. /// The maximum number of retry attempts. - /// The maximum delay in miliseconds. + /// The maximum delay in milliseconds. /// The token to monitor for cancellation requests. /// The Type of the logic return value. /// The execution context. diff --git a/src/slskd/Common/Validation/EnumAttribute.cs b/src/slskd/Common/Validation/EnumAttribute.cs index ad9b393c..ab28a9f0 100644 --- a/src/slskd/Common/Validation/EnumAttribute.cs +++ b/src/slskd/Common/Validation/EnumAttribute.cs @@ -21,7 +21,7 @@ namespace slskd.Validation using System.ComponentModel.DataAnnotations; /// - /// Validates that the value is a valid nember of the specified . + /// Validates that the value is a valid member of the specified . /// public class EnumAttribute : ValidationAttribute { diff --git a/src/slskd/Common/Validation/ValidationExtensions.cs b/src/slskd/Common/Validation/ValidationExtensions.cs index fd1da598..7a85a995 100644 --- a/src/slskd/Common/Validation/ValidationExtensions.cs +++ b/src/slskd/Common/Validation/ValidationExtensions.cs @@ -22,7 +22,7 @@ namespace slskd.Validation using System.Linq; /// - /// Extension methods for types involved with validaiton. + /// Extension methods for types involved with validation. /// public static class ValidationExtensions { diff --git a/src/slskd/Common/Waiter.cs b/src/slskd/Common/Waiter.cs index 58fbcb83..f8b3d305 100644 --- a/src/slskd/Common/Waiter.cs +++ b/src/slskd/Common/Waiter.cs @@ -348,7 +348,7 @@ namespace slskd // enqueueing a new wait. if (queue.IsEmpty) { - // enter the write lock to prevent Wait() (which obtains a read lock) from enqueing any more waits + // enter the write lock to prevent Wait() (which obtains a read lock) from enqueuing any more waits // before we can delete the dictionary record. it's ok and expected that Wait() might add this record // back to the dictionary as soon as this unblocks; we're preventing new waits from being discarded if // they are added by another thread just prior to the TryRemove() operation below. @@ -357,7 +357,7 @@ namespace slskd try { // check the queue again to ensure Wait() didn't enqueue anything between the last check and when - // we entered the write lock. this is guarateed to be safe since we now have exclusive access to + // we entered the write lock. this is guaranteed to be safe since we now have exclusive access to // the record and it should be impossible to remove a record containing a non-empty queue if (queue.IsEmpty) { diff --git a/src/slskd/Core/Blacklist.cs b/src/slskd/Core/Blacklist.cs index 76f0b37f..84e6feb6 100644 --- a/src/slskd/Core/Blacklist.cs +++ b/src/slskd/Core/Blacklist.cs @@ -179,7 +179,7 @@ public class Blacklist { if (format == BlacklistFormat.AutoDetect) { - Log.Debug("Attempting to auto-detect blacklist fomat from contents..."); + Log.Debug("Attempting to auto-detect blacklist format from contents..."); format = await DetectFormat(filename); // FormatException if unsuccessful Log.Debug("Detected blacklist format {Format}", format); } @@ -294,7 +294,7 @@ public class Blacklist } /// - /// Returns a value indicating whether the specified is contained witin the blacklist. + /// Returns a value indicating whether the specified is contained within the blacklist. /// /// The IP address to check. /// A value indicating whether the specified IP is contained within the blacklist. @@ -310,7 +310,7 @@ public class Blacklist return false; } - // conver the entire IP to a uint + // convert the entire IP to a uint var ipAsUint32 = ToUint32(ip); // check the list for this octet sequentially until the first match diff --git a/src/slskd/Core/Metrics.cs b/src/slskd/Core/Metrics.cs index b11d9d8f..7e0b0f6e 100644 --- a/src/slskd/Core/Metrics.cs +++ b/src/slskd/Core/Metrics.cs @@ -123,7 +123,7 @@ namespace slskd public static Gauge BranchLevel { get; } = Prometheus.Metrics.CreateGauge("slskd_dnet_branch_level", "Current distributed branch level"); /// - /// Gets a gauge representing the most recent average time tekn to broadcast incoming search requests to connected children. + /// Gets a gauge representing the most recent average time taken to broadcast incoming search requests to connected children. /// public static Gauge CurrentBroadcastLatency { get; } = Prometheus.Metrics.CreateGauge("slskd_dnet_broadcast_latency_current", "The average time taken to broadcast incoming search requests to connected children"); diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index dcba5cc0..05174031 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -744,7 +744,7 @@ namespace slskd bool IsBlankPath(string share) => Regex.IsMatch(share.LocalizePath(), @"^(!|-){0,1}(\[.*\])$"); directories?.Where(share => IsBlankPath(share)).ToList() - .ForEach(blank => results.Add(new ValidationResult($"Share {blank} doees not specify a path"))); + .ForEach(blank => results.Add(new ValidationResult($"Share {blank} does not specify a path"))); bool IsRootMount(string share) => Regex.IsMatch(share.LocalizePath(), @"^(!|-){0,1}(\[.*\])/$"); directories?.Where(share => IsRootMount(share)).ToList() @@ -1291,7 +1291,7 @@ namespace slskd /// [Argument(default, "disk-logger")] [EnvironmentVariable("DISK_LOGGER")] - [Description("ensable logging to disk")] + [Description("enable logging to disk")] [RequiresRestart] public bool Disk { get; init; } = false; } diff --git a/src/slskd/Files/FileService.cs b/src/slskd/Files/FileService.cs index 0d193d73..c5c0382f 100644 --- a/src/slskd/Files/FileService.cs +++ b/src/slskd/Files/FileService.cs @@ -337,7 +337,7 @@ namespace slskd.Files if (!overwrite && File.Exists(destinationFilename)) { - Log.Debug("Destination file {Destination} exists, and overwite option is not set; attempting to generate new filename", destinationFilename); + Log.Debug("Destination file {Destination} exists, and overwrite option is not set; attempting to generate new filename", destinationFilename); string extensionlessFilename = Path.Combine(Path.GetDirectoryName(destinationFilename), Path.GetFileNameWithoutExtension(sourceFilename)); string extension = Path.GetExtension(sourceFilename); diff --git a/src/slskd/Messaging/API/Controllers/ConversationsController.cs b/src/slskd/Messaging/API/Controllers/ConversationsController.cs index 4d455c53..c8a57bd4 100644 --- a/src/slskd/Messaging/API/Controllers/ConversationsController.cs +++ b/src/slskd/Messaging/API/Controllers/ConversationsController.cs @@ -39,15 +39,15 @@ namespace slskd.Messaging.API /// /// Initializes a new instance of the class. /// - /// + /// /// /// public ConversationsController( - IStateMonitor applicationStateMonotor, + IStateMonitor applicationStateMonitor, IMessagingService messagingService, IOptionsSnapshot optionsSnapshot) { - ApplicationStateMonitor = applicationStateMonotor; + ApplicationStateMonitor = applicationStateMonitor; Messages = messagingService; OptionsSnapshot = optionsSnapshot; } @@ -70,7 +70,7 @@ namespace slskd.Messaging.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(200)] [ProducesResponseType(404)] - public async Task Acknowledge([FromRoute]string username, [FromRoute]int id) + public async Task Acknowledge([FromRoute] string username, [FromRoute] int id) { if (Program.IsRelayAgent) { @@ -100,7 +100,7 @@ namespace slskd.Messaging.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(200)] [ProducesResponseType(404)] - public async Task AcknowledgeAll([FromRoute]string username) + public async Task AcknowledgeAll([FromRoute] string username) { if (Program.IsRelayAgent) { @@ -129,7 +129,7 @@ namespace slskd.Messaging.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(404)] [ProducesResponseType(204)] - public async Task Close([FromRoute]string username) + public async Task Close([FromRoute] string username) { if (Program.IsRelayAgent) { @@ -156,7 +156,7 @@ namespace slskd.Messaging.API [HttpGet("")] [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(List), 200)] - public async Task GetAll([FromQuery] bool includeInactive = false, [FromQuery]bool unAcknowledgedOnly = false) + public async Task GetAll([FromQuery] bool includeInactive = false, [FromQuery] bool unAcknowledgedOnly = false) { if (Program.IsRelayAgent) { @@ -185,7 +185,7 @@ namespace slskd.Messaging.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(Conversation), 200)] [ProducesResponseType(404)] - public async Task GetByUsername([FromRoute]string username, [FromQuery]bool includeMessages = true) + public async Task GetByUsername([FromRoute] string username, [FromQuery] bool includeMessages = true) { if (Program.IsRelayAgent) { @@ -206,7 +206,7 @@ namespace slskd.Messaging.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(List), 200)] [ProducesResponseType(404)] - public async Task GetMessagesByUsername([FromRoute]string username, [FromQuery]bool unAcknowledgedOnly = false) + public async Task GetMessagesByUsername([FromRoute] string username, [FromQuery] bool unAcknowledgedOnly = false) { if (Program.IsRelayAgent) { @@ -242,7 +242,7 @@ namespace slskd.Messaging.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(201)] [ProducesResponseType(400)] - public async Task Send([FromRoute]string username, [FromBody]string message) + public async Task Send([FromRoute] string username, [FromBody] string message) { if (Program.IsRelayAgent) { diff --git a/src/slskd/Messaging/RoomService.cs b/src/slskd/Messaging/RoomService.cs index 87ff1857..6e72fc16 100644 --- a/src/slskd/Messaging/RoomService.cs +++ b/src/slskd/Messaging/RoomService.cs @@ -32,7 +32,7 @@ namespace slskd.Messaging public interface IRoomService { /// - /// Joins the specfied . + /// Joins the specified . /// /// The name of the room to join. /// The operation context, including information about the room. @@ -95,7 +95,7 @@ namespace slskd.Messaging private IRoomTracker RoomTracker { get; set; } /// - /// Joins the specfied . + /// Joins the specified . /// /// The name of the room to join. /// The operation context, including information about the room. diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 8aa4aaed..81554b62 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -333,7 +333,7 @@ namespace slskd DefaultDownloadsDirectory = Path.Combine(AppDirectory, "downloads"); DefaultIncompleteDirectory = Path.Combine(AppDirectory, "incomplete"); - // the location of the configuration file might have been overriden by command line or envar. + // the location of the configuration file might have been overridden by command line or envar. // if not, set it to the default. ConfigurationFile ??= DefaultConfigurationFile; @@ -487,7 +487,7 @@ namespace slskd if (OptionsAtStartup.Flags.NoStart) { - Log.Information("Qutting because 'no-start' option is enabled"); + Log.Information("Quitting because 'no-start' option is enabled"); return; } diff --git a/src/slskd/Relay/NullRelayClient.cs b/src/slskd/Relay/NullRelayClient.cs index d86e994f..bfb23cf7 100644 --- a/src/slskd/Relay/NullRelayClient.cs +++ b/src/slskd/Relay/NullRelayClient.cs @@ -21,7 +21,7 @@ namespace slskd.Relay using System.Threading.Tasks; /// - /// A non-operarable Relay client. + /// A non-operable Relay client. /// public class NullRelayClient : IRelayClient { diff --git a/src/slskd/Relay/RelayService.cs b/src/slskd/Relay/RelayService.cs index d3f35693..6c965474 100644 --- a/src/slskd/Relay/RelayService.cs +++ b/src/slskd/Relay/RelayService.cs @@ -87,7 +87,7 @@ namespace slskd.Relay /// Retrieves information about the specified from the specified . /// /// - /// This is the first step in a mult-step workflow. The entire sequence is: + /// This is the first step in a multi-step workflow. The entire sequence is: /// /// /// Upload service calls and awaits , which requests the file info from the @@ -389,7 +389,7 @@ namespace slskd.Relay /// Retrieves information about the specified from the specified . /// /// - /// This is the first step in a mult-step workflow. The entire sequence is: + /// This is the first step in a multi-step workflow. The entire sequence is: /// /// /// Upload service calls and awaits , which requests the file info from the diff --git a/src/slskd/Search/ISearchService.cs b/src/slskd/Search/ISearchService.cs index 4fe15fae..097e23de 100644 --- a/src/slskd/Search/ISearchService.cs +++ b/src/slskd/Search/ISearchService.cs @@ -29,7 +29,7 @@ namespace slskd.Search public interface ISearchService { /// - /// Deletes the specified ssearch. + /// Deletes the specified search. /// /// The search to delete. /// The operation context. @@ -65,7 +65,7 @@ namespace slskd.Search /// Cancels the search matching the specified , if it is in progress. /// /// The unique identifier for the search. - /// A value indicating whether the search was sucessfully cancelled. + /// A value indicating whether the search was successfully cancelled. bool TryCancel(Guid id); } } \ No newline at end of file diff --git a/src/slskd/Search/SearchService.cs b/src/slskd/Search/SearchService.cs index ccdd8c2d..3d2e2750 100644 --- a/src/slskd/Search/SearchService.cs +++ b/src/slskd/Search/SearchService.cs @@ -70,7 +70,7 @@ namespace slskd.Search private IHubContext SearchHub { get; set; } /// - /// Deletes the specified ssearch. + /// Deletes the specified search. /// /// The search to delete. /// The operation context. @@ -245,7 +245,7 @@ namespace slskd.Search /// Cancels the search matching the specified , if it is in progress. /// /// The unique identifier for the search. - /// A value indicating whether the search was sucessfully cancelled. + /// A value indicating whether the search was successfully cancelled. public bool TryCancel(Guid id) { if (CancellationTokens.TryGetValue(id, out var cts)) diff --git a/src/slskd/Shares/IShareRepository.cs b/src/slskd/Shares/IShareRepository.cs index c721fa40..1ccfeb22 100644 --- a/src/slskd/Shares/IShareRepository.cs +++ b/src/slskd/Shares/IShareRepository.cs @@ -87,7 +87,7 @@ namespace slskd.Shares Scan FindLatestScan(); /// - /// Flags the latest scan as suspect, indicating that the cached contents may have divered from physical storage. + /// Flags the latest scan as suspect, indicating that the cached contents may have diverged from physical storage. /// void FlagLatestScanAsSuspect(); diff --git a/src/slskd/Shares/ShareService.cs b/src/slskd/Shares/ShareService.cs index 4f409705..6e6ff471 100644 --- a/src/slskd/Shares/ShareService.cs +++ b/src/slskd/Shares/ShareService.cs @@ -486,7 +486,7 @@ namespace slskd.Shares ComputeShareStatistics(); Log.Debug("Share statistics updated"); - // one of several thigns happened above before we got here: + // one of several things happened above before we got here: // this method was called with forceRescan = true // the storage mode is memory, and we loaded the in-memory db from a valid backup // the storage mode is disk, and the file is there and valid @@ -510,7 +510,7 @@ namespace slskd.Shares if (!forceRescan) { - Log.Warning("Re-attempting initializtion"); + Log.Warning("Re-attempting initialization"); await InitializeAsync(forceRescan: true); } else diff --git a/src/slskd/Shares/SoulseekFileFactory.cs b/src/slskd/Shares/SoulseekFileFactory.cs index 9a023ee5..0917a5c9 100644 --- a/src/slskd/Shares/SoulseekFileFactory.cs +++ b/src/slskd/Shares/SoulseekFileFactory.cs @@ -72,7 +72,7 @@ namespace slskd.Shares { file = TagLib.File.Create(filename, TagLib.ReadStyle.Average | TagLib.ReadStyle.PictureLazy); - // try to mimick the behavior of existing clients by providing attributes selectively and in a specific order, + // try to mimic the behavior of existing clients by providing attributes selectively and in a specific order, // depending on whether files use a lossless or lossy codec. lossless files should have BitsPerSample, while lossy // will not. this may not be the best way to determine this. bool isLossless = file.Properties.BitsPerSample > 0; diff --git a/src/slskd/Shares/SqliteShareRepository.cs b/src/slskd/Shares/SqliteShareRepository.cs index 029d74b8..4951467c 100644 --- a/src/slskd/Shares/SqliteShareRepository.cs +++ b/src/slskd/Shares/SqliteShareRepository.cs @@ -178,7 +178,7 @@ namespace slskd.Shares } /// - /// Diposes this object. + /// Disposes this object. /// public void Dispose() { @@ -258,7 +258,7 @@ namespace slskd.Shares } /// - /// Flags the latest scan as suspect, indicating that the cached contents may have divered from physical storage. + /// Flags the latest scan as suspect, indicating that the cached contents may have diverged from physical storage. /// public void FlagLatestScanAsSuspect() { diff --git a/src/slskd/Transfers/API/Controllers/TransfersController.cs b/src/slskd/Transfers/API/Controllers/TransfersController.cs index 160070fb..f143e4a7 100644 --- a/src/slskd/Transfers/API/Controllers/TransfersController.cs +++ b/src/slskd/Transfers/API/Controllers/TransfersController.cs @@ -67,7 +67,7 @@ namespace slskd.Transfers.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(204)] [ProducesResponseType(404)] - public IActionResult CancelDownloadAsync([FromRoute, Required] string username, [FromRoute, Required]string id, [FromQuery]bool remove = false) + public IActionResult CancelDownloadAsync([FromRoute, Required] string username, [FromRoute, Required] string id, [FromQuery] bool remove = false) { if (Program.IsRelayAgent) { @@ -136,7 +136,7 @@ namespace slskd.Transfers.API [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(204)] [ProducesResponseType(404)] - public IActionResult CancelUpload([FromRoute, Required] string username, [FromRoute, Required]string id, [FromQuery]bool remove = false) + public IActionResult CancelUpload([FromRoute, Required] string username, [FromRoute, Required] string id, [FromQuery] bool remove = false) { if (Program.IsRelayAgent) { @@ -207,7 +207,7 @@ namespace slskd.Transfers.API [ProducesResponseType(201)] [ProducesResponseType(typeof(string), 403)] [ProducesResponseType(typeof(string), 500)] - public async Task EnqueueAsync([FromRoute, Required]string username, [FromBody]IEnumerable requests) + public async Task EnqueueAsync([FromRoute, Required] string username, [FromBody] IEnumerable requests) { if (Program.IsRelayAgent) { @@ -233,7 +233,7 @@ namespace slskd.Transfers.API [HttpGet("downloads")] [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(200)] - public IActionResult GetDownloadsAsync([FromQuery]bool includeRemoved = false) + public IActionResult GetDownloadsAsync([FromQuery] bool includeRemoved = false) { if (Program.IsRelayAgent) { @@ -320,7 +320,7 @@ namespace slskd.Transfers.API } /// - /// Gets the downlaod for the specified username matching the specified filename, and requests + /// Gets the download for the specified username matching the specified filename, and requests /// the current place in the remote queue of the specified download. /// /// The username of the download source. diff --git a/src/slskd/Transfers/Uploads/UploadQueue.cs b/src/slskd/Transfers/Uploads/UploadQueue.cs index 53e135e8..c24f66cf 100644 --- a/src/slskd/Transfers/Uploads/UploadQueue.cs +++ b/src/slskd/Transfers/Uploads/UploadQueue.cs @@ -296,7 +296,7 @@ namespace slskd.Transfers // ddddddd // ^ // - // if we want the postion of the file over the carat above, first find the position of it + // if we want the position of the file over the carat above, first find the position of it // within its own queue (= 5). assume uploads will process top down, left to right until reaching // this one. that's 5 files from a, 2 from b, 5 from c, and the other 4 from d, putting the file over // the carat at position 16. the actual number will vary due to many factors, including where in the diff --git a/src/slskd/Users/UserService.cs b/src/slskd/Users/UserService.cs index e278ccc7..97ea1484 100644 --- a/src/slskd/Users/UserService.cs +++ b/src/slskd/Users/UserService.cs @@ -345,7 +345,7 @@ namespace slskd.Users await GetStatisticsAsync(username); // delay the add until last, so that IsWatched won't return true until stats and status are populated. this may result - // in several unecessary calls to WatchAsync (if someone is checking IsWatched() and WatchAsync()ing if false), but we + // in several unnecessary calls to WatchAsync (if someone is checking IsWatched() and WatchAsync()ing if false), but we // can be sure that if IsWatched() is true, we have valid stats and status. if we can't ensure this, the application // will have non-deterministic behavior when it makes decisions about user groups, limits, governance etc. WatchedUsernamesDictionary.TryAdd(username, true); @@ -368,7 +368,7 @@ namespace slskd.Users if (optionsHash != LastOptionsHash || force) { - // get a list of tracked names that haven't been explicitly added to any group, including those that were previlously + // get a list of tracked names that haven't been explicitly added to any group, including those that were previously // configured but have now been removed var usernamesBeforeUpdate = UserDictionary.Keys.ToList(); var usernamesAfterUpdate = options.Groups.UserDefined.SelectMany(g => g.Value.Members); -- cgit v1.2.3