mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-07 12:47:02 +01:00
feat(youtube/return-youtube-dislike): decrease request timeout (#171)
This commit is contained in:
parent
f5a4e6f3bf
commit
c372e0e9bd
@ -26,7 +26,7 @@ public class ReturnYouTubeDislikeApi {
|
||||
try {
|
||||
LogHelper.debug(ReturnYouTubeDislikeApi.class, "Fetching dislikes for " + videoId);
|
||||
HttpURLConnection connection = getConnectionFromRoute(ReturnYouTubeDislikeRoutes.GET_DISLIKES, videoId);
|
||||
connection.setConnectTimeout(5 * 1000);
|
||||
connection.setConnectTimeout(1000);
|
||||
if (connection.getResponseCode() == 200) {
|
||||
JSONObject json = getJSONObject(connection);
|
||||
dislikeCount = json.getInt("dislikes");
|
||||
@ -181,4 +181,4 @@ public class ReturnYouTubeDislikeApi {
|
||||
private static JSONObject getJSONObject(HttpURLConnection connection) throws Exception {
|
||||
return Requester.getJSONObject(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user