-
-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Types #116
Merged
Merged
Load Types #116
Conversation
This file contains 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
#117 builds onto the commits from this PR since I didn't make a new fork. Feel free to close one or both if need be. |
freyacodes
requested changes
Jun 19, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but requires documentation and a note in the changelog
freyacodes
approved these changes
Jun 19, 2018
freyacodes
pushed a commit
to freyacoded/repo-test
that referenced
this pull request
Oct 11, 2022
* add result status enum * move load result out into its own class * load changes * add search result value + logic for it * document load types * removed isPlaylist field from docs * add checks for unknown value * remove isPlaylist field * clarify version changes * add references to pr's
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.
Allows clients to determine if a call to the /loadtracks endpoint resulted in: a successful track load, a playlist/search load, no matches found or a load failure. Previously Lavalink simply returned an empty array of tracks for the last two cases. This PR doesn't change any of that: it still behaves exactly like it did before but with an added
loadType
field that is equal to eitherTRACK_LOADED
,PLAYLIST_LOADED
,SEARCH_RESULT
,NO_MATCHES
orLOAD_FAILED
.Proof that this PR works with search results. ^
Additionally, with the latest commit it might be feasible to remove the
isPlaylist
field and have it be replaced with theloadType
one, however this would be a breaking change for clients like my own which expect strictly-formatted responses, or those which already have support for that feature.