mirror of
https://github.com/revanced/revanced-integrations
synced 2024-11-19 13:57:14 +01:00
don't add the vanced user agent for the channel details route
This commit is contained in:
parent
b1a86abd34
commit
086b2f9757
@ -10,6 +10,8 @@ import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import fi.vanced.libraries.youtube.whitelisting.requests.WhitelistRoutes;
|
||||
|
||||
public class Requester {
|
||||
private Requester() {}
|
||||
|
||||
@ -17,7 +19,9 @@ public class Requester {
|
||||
String url = apiUrl + route.compile(params).getCompiledRoute();
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.setRequestMethod(route.getMethod().name());
|
||||
connection.setRequestProperty("User-agent", System.getProperty("http.agent") + ";vanced");
|
||||
if (route != WhitelistRoutes.GET_CHANNEL_DETAILS) {
|
||||
connection.setRequestProperty("User-agent", System.getProperty("http.agent") + ";vanced");
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user