Add Transfer Batches#1720
Merged
Merged
Conversation
…s are available (but not if the Soulseek.NET transfer is not dead)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the concept of a transfer "Batch", which is a grouping of transfers at the time they are enqueued.
A new endpoint allows a caller (and in subsequent changes, slskd's UI) to group a number of desired files when enqueuing them, and another endpoint allows a caller to get the status for the batch and all associated transfer records. This paves the way for features like a wishlist, and should also alleviate some pain points for third parties that use the slskd API.
A batch has, in addition to a collection of transfer records, a
SearchIdallowing it to be associated with a search. This is (or will be) useful in determining whether a particular search was fulfilled.Batches have an
Optionsproperty that, for right now, contains only one thing,Destination. Right now this does nothing, but in subsequent changes will allow a caller to choose the directory for the files in the batch explicitly.I have marked the existing endpoint used to enqueue groups of files as
[Obsolete]internally and will remove it in the future, requiring that all transfers are enqueued in batches, even if it's just one file.Testing
POST /batches
GET /batches/{id}