Skip to content

Commit ccd7ceb

Browse files
committed
Handle /playlist type mix links.
1 parent 3207387 commit ccd7ceb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

common/src/main/java/dev/lavalink/youtube/YoutubeAudioSourceManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,14 @@ protected Router getRouter(@NotNull HttpInterface httpInterface, @NotNull String
274274
} else if ("/playlist".equals(urlInfo.path)) {
275275
String playlistId = urlInfo.parameters.get("list");
276276

277-
if (playlistId != null) return (client) -> client.loadPlaylist(this, httpInterface, playlistId, null);
277+
if (playlistId != null) {
278+
if (playlistId.startsWith("RD")) { // mix handling
279+
String videoId = playlistId.substring(2);
280+
return (client) -> client.loadMix(this, httpInterface, playlistId, videoId);
281+
}
282+
283+
return (client) -> client.loadPlaylist(this, httpInterface, playlistId, null);
284+
}
278285
} else if ("/watch_videos".equals(urlInfo.path)) {
279286
String videoIds = urlInfo.parameters.get("video_ids");
280287

0 commit comments

Comments
 (0)