forked from lavalink-devs/Lavalink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
778a007
commit fdfdb04
Showing
6 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
20 changes: 20 additions & 0 deletions
20
LavalinkServer/src/main/java/lavalink/server/player/LoadResult.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package lavalink.server.player; | ||
|
||
import com.sedmelluq.discord.lavaplayer.track.AudioTrack; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
class LoadResult { | ||
public List<AudioTrack> tracks; | ||
public String playlistName; | ||
public ResultStatus loadResultType; | ||
public Integer selectedTrack; | ||
|
||
LoadResult(List<AudioTrack> tracks, String playlistName, ResultStatus loadResultType, Integer selectedTrack) { | ||
this.tracks = Collections.unmodifiableList(tracks); | ||
this.playlistName = playlistName; | ||
this.loadResultType = loadResultType; | ||
this.selectedTrack = selectedTrack; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
LavalinkServer/src/main/java/lavalink/server/player/ResultStatus.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package lavalink.server.player; | ||
|
||
public enum ResultStatus { | ||
TRACK_LOADED, | ||
PLAYLIST_LOADED, | ||
SEARCH_RESULT, | ||
NO_MATCHES, | ||
LOAD_FAILED, | ||
UNKNOWN | ||
} |
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