Skip to content

Commit

Permalink
Patch for new case-sensitive version of the hash-based API
Browse files Browse the repository at this point in the history
  • Loading branch information
faissaloo committed Mar 11, 2021
1 parent 514821c commit 0e63fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sponskrub/sponsorblock.d
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0e63fb5

Please sign in to comment.