From d2d75f093def1e72dee8e0a1653ce3c5986ec7aa Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Sat, 26 Sep 2015 17:30:55 +0100 Subject: [PATCH] Fixing offset for youtube videos --- service_youtube.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_youtube.go b/service_youtube.go index 1ef3b7b..a2c5b0c 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -108,7 +108,7 @@ func (yt YouTube) parseTime(duration string) time.Duration { var days, hours, minutes, seconds, totalSeconds int64 if duration != "" { timestampExp := regexp.MustCompile(`P(?P\d+D)?T(?P\d+H)?(?P\d+M)?(?P\d+S)?`) - timestampMatch := timestampExp.FindStringSubmatch(duration) + timestampMatch := timestampExp.FindStringSubmatch(strings.ToUpper(duration)) timestampResult := make(map[string]string) for i, name := range timestampExp.SubexpNames() { if i < len(timestampMatch) {