mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Fix missing timestamp on first chapter
This commit is contained in:
parent
3fba6f5728
commit
08d82cc749
1 changed files with 8 additions and 3 deletions
|
@ -3,8 +3,9 @@
|
|||
<hr class="description-content-separator"/>
|
||||
<h4>Chapters</h4>
|
||||
<div class="description-chapters-content-container">
|
||||
<% chapters.each do | chapter |%>
|
||||
<a href="/watch?v=<%= video.id %>&t=<%=chapter.start_ms.milliseconds.total_seconds.to_i %>">
|
||||
<% chapters.each do | chapter | %>
|
||||
<%- start_in_seconds = chapter.start_ms.milliseconds.total_seconds.to_i %>
|
||||
<a href="/watch?v=<%-= video.id %>&t=<%=start_in_seconds %>">
|
||||
<div class="chapter">
|
||||
<div class="thumbnail">
|
||||
<%- if !env.get("preferences").as(Preferences).thin_mode -%>
|
||||
|
@ -13,7 +14,11 @@
|
|||
<div class="thumbnail-placeholder"></div>
|
||||
<%- end -%>
|
||||
</div>
|
||||
<p><%-= recode_length_seconds(chapter.start_ms.milliseconds.total_seconds) -%></p>
|
||||
<%- if start_in_seconds > 0 -%>
|
||||
<p><%-= recode_length_seconds(start_in_seconds) -%></p>
|
||||
<%- else -%>
|
||||
<p>0:00</p>
|
||||
<%- end -%>
|
||||
<p><%-=chapter.title-%></p>
|
||||
</div>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue