We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f48e36d commit cd4dfffCopy full SHA for cd4dfff
app/controllers/podcasts_controller.rb
@@ -51,7 +51,14 @@ def convert_shownote(content)
51
t = $1
52
t = (t.size == '0:00'.size) ? '0' + t : t
53
t = (t.size == '00:00'.size) ? '00:' + t : t
54
- t = Time.parse(t).seconds_since_midnight.to_i
+
55
+ #t = Time.parse(t).seconds_since_midnight.to_i
56
+ # This format should be faster than above:
57
+ # ?t=01:23:45
58
+ # ?t=01h23m45s
59
+ t[2] = 'h'
60
+ t[5] = 'm'
61
+ t << 's'
62
"- [#{$1}](https://youtu.be/#{youtube_id}?t=#{t}) "
63
end
64
0 commit comments