Skip to content

Commit

Permalink
Ignore loading of LL/WL/LM playlists as they require a user
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Apr 22, 2024
1 parent a63702f commit 4ea899b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "dev.lavalink.youtube"
version = "1.0.3"
version = "1.0.4"

allprojects {
group = rootProject.group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ protected Router routeFromVideoId(@NotNull HttpInterface httpInterface,
return (client) -> client.loadMix(this, httpInterface, playlistId, trimmedId);
}

return (client) -> client.loadPlaylist(this, httpInterface, playlistId, trimmedId);
if (!playlistId.startsWith("LL") && // Liked videos (requires logged-in user)
!playlistId.startsWith("WL") && // Watch later (requires logged-in user)
!playlistId.startsWith("LM")) { // Liked music (requires logged-in user)
return (client) -> client.loadPlaylist(this, httpInterface, playlistId, trimmedId);
}
}

return (client) -> client.loadVideo(this, httpInterface, trimmedId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name=youtube
path=dev.lavalink.youtube.plugin
version=1.0.3
version=1.0.4

0 comments on commit 4ea899b

Please sign in to comment.