Only add url to non-original thumnails.

This commit is contained in:
Kavin 2023-07-19 01:00:06 +01:00
parent 68bbf05617
commit fcc3c9daaf
No known key found for this signature in database
GPG key ID: 6E4598CA5C92C41F

View file

@ -81,7 +81,8 @@ public class SponsorBlockUtils {
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())));
}
});