Sponsorblock progressbar (#18)

* Generate sponsorblock bar

* Sponsorblock chapter label

* Add comment

* Fix typo

* Changelog
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2022-11-30 19:41:07 -05:00
1 parent 21593001ae
commit 64cf7b54a0
7 files changed
+192 -1

No files matched your search

+16
View File
@@ -45,4 +45,20 @@ namespace TimeUtils
return validstr(ma[mNum - 1])
end function
function ParseTime(time as string) as integer
hours = 0
minutes = 0
seconds = 0
tokens = time.Tokenize(":")
if tokens.Count() = 3
hours = tokens[0].ToInt()
minutes = tokens[1].ToInt()
seconds = tokens[2].ToInt()
else if tokens.Count() = 2
minutes = tokens[0].ToInt()
seconds = tokens[1].ToInt()
end if
return hours * 3600 + minutes * 60 + seconds
end function
end namespace