mirror of
https://github.com/YTVanced/Integrations
synced 2024-11-27 05:33:00 +00:00
don't add the vanced user agent for the channel details route
This commit is contained in:
parent
cb9006190f
commit
c0ae51d29a
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue