Skip to content

Commit

Permalink
Only apply access token to PLAYER_URL (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
JirayuSrisawat-Github authored Nov 30, 2024
1 parent c358ae4 commit 8ac9073
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools;
import com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface;
import com.sedmelluq.discord.lavaplayer.tools.io.HttpInterfaceManager;
import dev.lavalink.youtube.clients.skeleton.Client;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
Expand Down Expand Up @@ -258,6 +259,10 @@ public void applyToken(HttpUriRequest request) {
return;
}

if (!Client.PLAYER_URL.equals(request.getURI().toString())) {
return;
}

if (shouldRefreshAccessToken()) {
log.debug("Access token has expired, refreshing...");

Expand Down

0 comments on commit 8ac9073

Please sign in to comment.