Skip to content

Commit

Permalink
Merge pull request #649 from TeamPiped/dearrow
Browse files Browse the repository at this point in the history
Dearrow add url only to non-original thumbnails
  • Loading branch information
FireMasterK committed Jul 19, 2023
2 parents 68bbf05 + fcc3c9d commit 46f20fe
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 46f20fe

Please sign in to comment.