mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-12 16:56:49 +01:00
feat(youtube/return-youtube-dislike): decrease request timeout (#171)
This commit is contained in:
parent
213b0dc7d9
commit
7c4fb0a3dd
@ -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…
x
Reference in New Issue
Block a user