2023-06-30 14:42:10 +01:00

20 lines
473 B
Java

package me.kavin.piped.utils;
import me.kavin.piped.consts.Constants;
import static me.kavin.piped.utils.RequestUtils.sendGetJson;
public class RydHelper {
public static double getDislikeRating(String videoId) throws Exception {
if (Constants.DISABLE_RYD)
return -1;
return sendGetJson(Constants.RYD_PROXY_URL + "/votes/" + videoId)
.thenApply(tree -> tree.path("rating").asDouble(-1))
.get();
}
}