summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-07-18 15:17:02 -0500
committerOmar Roth <omarroth@hotmail.com>2018-07-18 15:17:02 -0500
commit44016a67791625bd93421ede564fee5a1ba3270b (patch)
tree3d0ccc5af3ac0f8c529e499a50cd9ba4771077c6 /src
parent18f8a4ae1ab79095bf1e2bcbdbf8804f1e0b2654 (diff)
downloadinvidious-44016a67791625bd93421ede564fee5a1ba3270b.tar.gz
invidious-44016a67791625bd93421ede564fee5a1ba3270b.tar.bz2
invidious-44016a67791625bd93421ede564fee5a1ba3270b.zip
Fix minute matching in decode_time
Diffstat (limited to 'src')
-rw-r--r--src/invidious/helpers.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/helpers.cr b/src/invidious/helpers.cr
index d9d64bf0..d3f85b30 100644
--- a/src/invidious/helpers.cr
+++ b/src/invidious/helpers.cr
@@ -819,7 +819,7 @@ def decode_time(string)
hours = /(?<hours>\d+)h/.match(string).try &.["hours"].try &.to_i
hours ||= 0
- minutes = /(?<minutes>\d+)m/.match(string).try &.["minutes"].try &.to_i
+ minutes = /(?<minutes>\d+)m(?!s)/.match(string).try &.["minutes"].try &.to_i
minutes ||= 0
seconds = /(?<seconds>\d+)s/.match(string).try &.["seconds"].try &.to_i