summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/invidious/helpers/utils.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr
index 5ddc8375..8d4eff9b 100644
--- a/src/invidious/helpers/utils.cr
+++ b/src/invidious/helpers/utils.cr
@@ -1675,7 +1675,7 @@ def make_client(url : URI, region = nil)
end
def decode_length_seconds(string)
- length_seconds = string.split(":").map { |a| a.to_i }
+ length_seconds = string.gsub(/[^0-9:]/, "").split(":").map &.to_i
length_seconds = [0] * (3 - length_seconds.size) + length_seconds
length_seconds = Time::Span.new(length_seconds[0], length_seconds[1], length_seconds[2])
length_seconds = length_seconds.total_seconds.to_i