Sponsorblock progressbar (#18)
* Generate sponsorblock bar * Sponsorblock chapter label * Add comment * Fix typo * Changelog
This commit is contained in:
1 parent
21593001ae
commit
64cf7b54a0
7 files changed
+192
-1
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user