Skip to content

Commit

Permalink
Community: Render playlist attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer committed Jul 12, 2023
1 parent babd3c1 commit 62c2952
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/invidious/frontend/comments_youtube.cr
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ module Invidious::Frontend::Comments
</div>
END_HTML
end
when "playlist"
if attachment["error"]?
html << <<-END_HTML
<div class="pure-g video-iframe-wrapper">
<p>#{attachment["error"]}</p>
</div>
END_HTML
else
html << <<-END_HTML
<div class="pure-g video-iframe-wrapper">
<iframe class="video-iframe" src='/embed/#{attachment.dig?("videos", 0, "videoId")}?autoplay=0&list=#{attachment["playlistId"]}'></iframe>
</div>
END_HTML
end
else nil # Ignore
end
end
Expand Down

0 comments on commit 62c2952

Please sign in to comment.