aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-08-13 17:34:40 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-08-13 17:34:40 -0500
commit6ef1fa262aaeb348a40374f02abb180c5e086056 (patch)
tree22f40622d3cb8bd2d683e93afd02c3525f0160f0 /src/slskd/Transfers
parent7c2f9c6708fbb76a44f78fe7dd166c27d93a001c (diff)
parent3a8d1098ddd42f02450c7be569965c7b26f230e8 (diff)
downloadslskd-6ef1fa262aaeb348a40374f02abb180c5e086056.tar.gz
Merge remote-tracking branch 'origin/master' into upload-bugs
Diffstat (limited to 'src/slskd/Transfers')
-rw-r--r--src/slskd/Transfers/Uploads/UploadQueue.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/slskd/Transfers/Uploads/UploadQueue.cs b/src/slskd/Transfers/Uploads/UploadQueue.cs
index 9ac6b385..36e5474c 100644
--- a/src/slskd/Transfers/Uploads/UploadQueue.cs
+++ b/src/slskd/Transfers/Uploads/UploadQueue.cs
@@ -57,6 +57,13 @@ namespace slskd.Transfers
void Enqueue(string username, string filename);
/// <summary>
+ /// Gets information about the specified <paramref name="groupName"/>.
+ /// </summary>
+ /// <param name="groupName">The name of the group.</param>
+ /// <returns>The group information.</returns>
+ UploadGroup GetGroupInfo(string groupName);
+
+ /// <summary>
/// Computes the estimated queue position of the specified <paramref name="filename"/> for the specified <paramref name="username"/>.
/// </summary>
/// <param name="username">The username associated with the file.</param>
@@ -224,6 +231,21 @@ namespace slskd.Transfers
}
/// <summary>
+ /// Gets information about the specified <paramref name="groupName"/>.
+ /// </summary>
+ /// <param name="groupName">The name of the group.</param>
+ /// <returns>The group information.</returns>
+ public UploadGroup GetGroupInfo(string groupName)
+ {
+ if (Groups.TryGetValue(groupName, out var group))
+ {
+ return group;
+ }
+
+ throw new NotFoundException($"A group with the name {groupName} could not be found");
+ }
+
+ /// <summary>
/// Computes the estimated queue position of the specified <paramref name="filename"/> for the specified <paramref name="username"/>.
/// </summary>
/// <param name="username">The username associated with the file.</param>