mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 09:47:22 +01:00
we did it reddit! theres now non-array subtitle support!!!
This commit is contained in:
parent
f6e0e6667a
commit
c972e84a55
1 changed files with 10 additions and 2 deletions
|
@ -318,6 +318,7 @@
|
||||||
|
|
||||||
|
|
||||||
<% if ( video.Subtitles.Subtitle) { %>
|
<% if ( video.Subtitles.Subtitle) { %>
|
||||||
|
|
||||||
<% if (Array.isArray( video.Subtitles.Subtitle)) { %>
|
<% if (Array.isArray( video.Subtitles.Subtitle)) { %>
|
||||||
<% video.Subtitles.Subtitle.forEach(x => { %>
|
<% video.Subtitles.Subtitle.forEach(x => { %>
|
||||||
<track src="/api/subtitles?v=<%=video.id%>&h=<%= x.language %>" label="<%= x.language.replace("United States","Simplified - USA") %>" kind="subtitles">
|
<track src="/api/subtitles?v=<%=video.id%>&h=<%= x.language %>" label="<%= x.language.replace("United States","Simplified - USA") %>" kind="subtitles">
|
||||||
|
@ -325,7 +326,14 @@
|
||||||
<img src="https://t.poketube.fun/t/rep.gif?v=<%=btoa(video.id)%>&h=<%= x.language %>" id="subtitle_usage_rate" style="border:0;width: 0;visibility: hidden;">
|
<img src="https://t.poketube.fun/t/rep.gif?v=<%=btoa(video.id)%>&h=<%= x.language %>" id="subtitle_usage_rate" style="border:0;width: 0;visibility: hidden;">
|
||||||
<% }) %>
|
<% }) %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if (!Array.isArray( video.Subtitles.Subtitle)) { %>
|
||||||
|
<track src="/api/subtitles?v=<%=video.id%>&h=<%= video.Subtitles.Subtitle.language %>" label="<%= video.Subtitles.Subtitle.language.replace("United States","Simplified - USA") %>" kind="subtitles">
|
||||||
|
|
||||||
|
<img src="https://t.poketube.fun/t/rep.gif?v=<%=btoa(video.id)%>&h=<%= video.Subtitles.Subtitle.language %>" id="subtitle_usage_rate" style="border:0;width: 0;visibility: hidden;">
|
||||||
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
</video><img src="https://t.poketube.fun/t/rep.gif?video=<%=btoa(video.id)%>" style="border:0;width: 0;visibility: hidden;" id="video">
|
</video><img src="https://t.poketube.fun/t/rep.gif?video=<%=btoa(video.id)%>" style="border:0;width: 0;visibility: hidden;" id="video">
|
||||||
<div style="display: flex;justify-content: center;align-items: center;flex-direction: row; column-gap: 3px;" align="center">
|
<div style="display: flex;justify-content: center;align-items: center;flex-direction: row; column-gap: 3px;" align="center">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue