Fix regression related of timestamp 0:00

This commit is contained in:
Féry Mathieu (Mathius) 2022-04-20 00:42:09 +02:00
parent cf755dec22
commit da53de2097
No known key found for this signature in database
GPG Key ID: 935858CF779FB2CE
1 changed files with 1 additions and 1 deletions

View File

@ -596,7 +596,7 @@ def content_to_comment_html(content)
length_seconds = watch_endpoint["startTimeSeconds"]? length_seconds = watch_endpoint["startTimeSeconds"]?
video_id = watch_endpoint["videoId"].as_s video_id = watch_endpoint["videoId"].as_s
if length_seconds && length_seconds.as_i > 0 if length_seconds && length_seconds.as_i >= 0
text = %(<a href="javascript:void(0)" data-onclick="jump_to_time" data-jump-time="#{length_seconds}">#{text}</a>) text = %(<a href="javascript:void(0)" data-onclick="jump_to_time" data-jump-time="#{length_seconds}">#{text}</a>)
else else
text = %(<a href="/watch?v=#{video_id}">#{"youtube.com/watch?v=#{video_id}"}</a>) text = %(<a href="/watch?v=#{video_id}">#{"youtube.com/watch?v=#{video_id}"}</a>)