Skip to content

Commit

Permalink
Merge pull request #2 from drwilco/main
Browse files Browse the repository at this point in the history
don't forget the freaking offset
  • Loading branch information
docwilco authored Feb 16, 2021
2 parents d2c1135 + e528d4a commit 44fcacb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vcl/dgc.drwil.co.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ sub vcl_recv {
set var.time -= std.atoi(re.group.1);
set var.time %= 1000000;
if (var.site == "soundcloud") {
set var.location = "https://soundcloud.com" + var.path;
set var.location = "https://soundcloud.com" + var.path + "#t=" + var.time;
error 302 var.location;
} else if (var.site == "mixcloud") {
set req.http.time = var.time;
error 200 var.path;
} else if (var.site == "youtube") {
set var.location = "https://www.youtube.com/watch?" + req.url.qs;
set var.location = "https://www.youtube.com/watch?" + req.url.qs + "#t=" + var.time;
error 302 var.location;
}
}
Expand Down

0 comments on commit 44fcacb

Please sign in to comment.