Skip to content
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 10 commits into from
Jun 19, 2018
Merged

Load Types #116

merged 10 commits into from
Jun 19, 2018

Conversation

SamOphis
Copy link
Contributor

@SamOphis SamOphis commented Jun 16, 2018

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 either TRACK_LOADED, PLAYLIST_LOADED, SEARCH_RESULT, NO_MATCHES or LOAD_FAILED.

image

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 the loadType 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.

@SamOphis
Copy link
Contributor Author

#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.

Copy link
Member

@freyacodes freyacodes left a 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 freyacodes merged commit d395426 into lavalink-devs:v3 Jun 19, 2018
@SamOphis SamOphis deleted the patch-3 branch June 19, 2018 22:43
@SamOphis SamOphis mentioned this pull request Jul 19, 2018
4 tasks
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants