diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-06 23:00:39 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-06 23:00:39 -0500 |
| commit | e190624eb0f608469f43d374dbc5d737e3eab31e (patch) | |
| tree | 923f22f9f1ab9e39901286e81b6375414fd2e483 | |
| parent | 8b572d268df20bada27e0d82c0d2b361ac7c6d94 (diff) | |
| download | invidious-e190624eb0f608469f43d374dbc5d737e3eab31e.tar.gz invidious-e190624eb0f608469f43d374dbc5d737e3eab31e.tar.bz2 invidious-e190624eb0f608469f43d374dbc5d737e3eab31e.zip | |
Support '18m12s' format in video description timestamp
| -rw-r--r-- | src/invidious/comments.cr | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 8fdc40fc..575561d2 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -203,7 +203,12 @@ def add_alt_links(html) </a> END_HTML elsif url.to_s == "#" - length_seconds = decode_length_seconds(anchor.content) + begin + length_seconds = decode_length_seconds(anchor.content) + rescue ex + length_seconds = decode_time(anchor.content) + end + alt_anchor = <<-END_HTML <a href="javascript:void(0)" onclick="player.currentTime(#{length_seconds})">#{anchor.content}</a> END_HTML |
