mirror of https://github.com/iv-org/invidious.git
Fix missing timestamp on first chapter
This commit is contained in:
parent
3fba6f5728
commit
08d82cc749
|
@ -3,8 +3,9 @@
|
||||||
<hr class="description-content-separator"/>
|
<hr class="description-content-separator"/>
|
||||||
<h4>Chapters</h4>
|
<h4>Chapters</h4>
|
||||||
<div class="description-chapters-content-container">
|
<div class="description-chapters-content-container">
|
||||||
<% chapters.each do | chapter |%>
|
<% chapters.each do | chapter | %>
|
||||||
<a href="/watch?v=<%= video.id %>&t=<%=chapter.start_ms.milliseconds.total_seconds.to_i %>">
|
<%- 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="chapter">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<%- if !env.get("preferences").as(Preferences).thin_mode -%>
|
<%- if !env.get("preferences").as(Preferences).thin_mode -%>
|
||||||
|
@ -13,7 +14,11 @@
|
||||||
<div class="thumbnail-placeholder"></div>
|
<div class="thumbnail-placeholder"></div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</div>
|
</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>
|
<p><%-=chapter.title-%></p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue