Skip to content

Commit

Permalink
Only add url to non-original thumnails.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Jul 19, 2023
1 parent 68bbf05 commit fcc3c9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/me/kavin/piped/utils/SponsorBlockUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ private static CompletableFuture<Optional<JsonNode>> getDeArrowedInfo(String vid
optional.ifPresent(jsonNode -> {
ArrayNode nodes = (ArrayNode) jsonNode.get("thumbnails");
for (JsonNode node : nodes) {
((ObjectNode) node).set("thumbnail", new TextNode(URLUtils.rewriteURL("https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=" + videoId + "&time=" + node.get("timestamp").asText())));
if (!node.get("original").booleanValue())
((ObjectNode) node).set("thumbnail", new TextNode(URLUtils.rewriteURL("https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=" + videoId + "&time=" + node.get("timestamp").asText())));
}
});

Expand Down

0 comments on commit fcc3c9d

Please sign in to comment.