From 0e63fb5af705904bac3c4460a100c706c7135f1b Mon Sep 17 00:00:00 2001 From: faissaloo Date: Thu, 11 Mar 2021 23:06:30 +0000 Subject: [PATCH] Patch for new case-sensitive version of the hash-based API --- src/sponskrub/sponsorblock.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sponskrub/sponsorblock.d b/src/sponskrub/sponsorblock.d index 046f2f5..94d8f85 100644 --- a/src/sponskrub/sponsorblock.d +++ b/src/sponskrub/sponsorblock.d @@ -61,7 +61,7 @@ ClipTime[] get_video_skip_times_direct(string video_id, Categories[] categories, } ClipTime[] get_video_skip_times_private(string video_id, Categories[] categories, string api_url) { - auto data = get("http://%s/api/skipSegments/%s?categories=%s".format(api_url, sha256Of(video_id).toHexString!()[0..uniform(3,32)], `["`~(cast(string[])categories).join(`", "`)~`"]`)); + auto data = get("http://%s/api/skipSegments/%s?categories=%s".format(api_url, sha256Of(video_id).toHexString!(LetterCase.lower)[0..uniform(3,32)], `["`~(cast(string[])categories).join(`", "`)~`"]`)); auto json = parseJSON(data); foreach (JSONValue video; json.array) { if (video["videoID"].str == video_id) {