From e88ae814d6112a4013bb1be6264bc41e7d88bcb5 Mon Sep 17 00:00:00 2001 From: fiveofeight Date: Thu, 14 Jan 2016 14:40:56 -0500 Subject: [PATCH] Fixed youtube offsets not working when the url used &t and #t vs ?t. --- service_youtube.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_youtube.go b/service_youtube.go index a6b592c..268ec73 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -88,7 +88,7 @@ func (yt YouTube) NewSong(user *gumble.User, id, offset string, playlist Playlis title: title, id: id, url: "https://youtu.be/" + id, - offset: int(yt.parseTime(offset, `\?T\=(?P\d+D)?(?P\d+H)?(?P\d+M)?(?P\d+S)?`).Seconds()), + offset: int(yt.parseTime(offset, `T\=(?P\d+D)?(?P\d+H)?(?P\d+M)?(?P\d+S)?`).Seconds()), duration: int(yt.parseTime(duration, `P(?P\d+D)?T(?P\d+H)?(?P\d+M)?(?P\d+S)?`).Seconds()), thumbnail: thumbnail, format: "m4a",