diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-03-03 10:03:24 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-03-03 10:55:49 -0600 |
| commit | 07ef48a07ae239bcb8a08c3e719ac0025c8915fa (patch) | |
| tree | bda2c18cf3eec6ad982f9213f3c6562f0700e57c | |
| parent | 03f94db5e2541cb9474d90737d9c0ae95609835a (diff) | |
| download | invidious-07ef48a07ae239bcb8a08c3e719ac0025c8915fa.tar.gz invidious-07ef48a07ae239bcb8a08c3e719ac0025c8915fa.tar.bz2 invidious-07ef48a07ae239bcb8a08c3e719ac0025c8915fa.zip | |
Add length_seconds to playlist on watch page
| -rw-r--r-- | src/invidious/mixes.cr | 5 | ||||
| -rw-r--r-- | src/invidious/playlists.cr | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/invidious/mixes.cr b/src/invidious/mixes.cr index c91e83a2..011c5722 100644 --- a/src/invidious/mixes.cr +++ b/src/invidious/mixes.cr @@ -99,7 +99,10 @@ def template_mix(mix) html += <<-END_HTML <li class="pure-menu-item"> <a href="/watch?v=#{video["videoId"]}&list=#{mix["mixId"]}"> - <img style="width:100%;" src="/vi/#{video["videoId"]}/mqdefault.jpg"> + <div class="thumbnail"> + <img class="thumbnail" src="/vi/#{video["videoId"]}/mqdefault.jpg"> + <p class="length">#{recode_length_seconds(video["lengthSeconds"].as_i)}</p> + </div> <p style="width:100%">#{video["title"]}</p> <p> <b style="width: 100%">#{video["author"]}</b> diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 28f2e4ce..9f844ce6 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -234,7 +234,10 @@ def template_playlist(playlist) html += <<-END_HTML <li class="pure-menu-item"> <a href="/watch?v=#{video["videoId"]}&list=#{playlist["playlistId"]}"> - <img style="width:100%;" src="/vi/#{video["videoId"]}/mqdefault.jpg"> + <div class="thumbnail"> + <img class="thumbnail" src="/vi/#{video["videoId"]}/mqdefault.jpg"> + <p class="length">#{recode_length_seconds(video["lengthSeconds"].as_i)}</p> + </div> <p style="width:100%">#{video["title"]}</p> <p> <b style="width: 100%">#{video["author"]}</b> |
