@@ -46,7 +46,7 @@ public RestHandler(SocketServer socketServer, Config config, AbstractRoutePlanne
4646 }
4747
4848 @ GetMapping (value = "/v4/lyrics/{videoId}" )
49- public Lyrics getLyrics (@ PathVariable String videoId ) {
49+ public Lyrics getLyrics (@ PathVariable ( "videoId" ) String videoId ) {
5050 try {
5151 return ytClient .requestLyrics (videoId ).get ();
5252 } catch (Exception e ) {
@@ -59,7 +59,10 @@ public Lyrics getLyrics(@PathVariable String videoId) {
5959 }
6060
6161 @ GetMapping (value = "/v4/lyrics/search" )
62- public Object search (@ RequestParam String query , @ RequestParam (required = false , defaultValue = "youtube" ) String source ) {
62+ public Object search (
63+ @ RequestParam ("query" ) String query ,
64+ @ RequestParam (name = "source" , required = false , defaultValue = "youtube" ) String source
65+ ) {
6366 try {
6467 return switch (source .toLowerCase (Locale .ROOT )) {
6568 case "youtube" -> ytClient .search (query , config .getCountryCode ()).get ();
@@ -80,7 +83,7 @@ public Object search(@RequestParam String query, @RequestParam(required = false,
8083 }
8184
8285 @ GetMapping (value = "/v4/sessions/{sessionId}/players/{guildId}/lyrics" )
83- public Lyrics getLyricsOfPlayingTrack (@ PathVariable String sessionId , @ PathVariable long guildId ) throws Exception {
86+ public Lyrics getLyricsOfPlayingTrack (@ PathVariable ( "sessionId" ) String sessionId , @ PathVariable ( "guildId" ) long guildId ) throws Exception {
8487 final var playingTrack = socketContext (socketServer , sessionId )
8588 .getPlayer (guildId )
8689 .getTrack ();
0 commit comments