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) {