mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2025-04-29 08:20:30 +05:30
Merge pull request #649 from TeamPiped/dearrow
Dearrow add url only to non-original thumbnails
This commit is contained in:
commit
46f20fe766
@ -81,7 +81,8 @@ public class SponsorBlockUtils {
|
|||||||
optional.ifPresent(jsonNode -> {
|
optional.ifPresent(jsonNode -> {
|
||||||
ArrayNode nodes = (ArrayNode) jsonNode.get("thumbnails");
|
ArrayNode nodes = (ArrayNode) jsonNode.get("thumbnails");
|
||||||
for (JsonNode node : nodes) {
|
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())));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user