mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-12 23:58:31 +00:00
Add support for verified badges on video results
This commit is contained in:
parent
d3482831c8
commit
9188d7c52b
@ -1550,6 +1550,7 @@ post "/feed/webhook/:token" do |env|
|
||||
updated: updated,
|
||||
ucid: video.ucid,
|
||||
author: author,
|
||||
author_verified: false,
|
||||
length_seconds: video.length_seconds,
|
||||
live_now: video.live_now,
|
||||
premiere_timestamp: video.premiere_timestamp,
|
||||
|
@ -17,6 +17,7 @@ struct ChannelVideo
|
||||
property updated : Time
|
||||
property ucid : String
|
||||
property author : String
|
||||
property author_verified : Bool = false
|
||||
property length_seconds : Int32 = 0
|
||||
property live_now : Bool = false
|
||||
property premiere_timestamp : Time? = nil
|
||||
@ -275,6 +276,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
|
||||
updated: Time.utc,
|
||||
ucid: ucid,
|
||||
author: author,
|
||||
author_verified: false,
|
||||
length_seconds: length_seconds,
|
||||
live_now: live_now,
|
||||
premiere_timestamp: premiere_timestamp,
|
||||
@ -318,6 +320,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
|
||||
updated: Time.utc,
|
||||
ucid: video.ucid,
|
||||
author: video.author,
|
||||
author_verified: video.author_verified,
|
||||
length_seconds: video.length_seconds,
|
||||
live_now: video.live_now,
|
||||
premiere_timestamp: video.premiere_timestamp,
|
||||
|
@ -140,6 +140,9 @@
|
||||
<p style="display: flex;">
|
||||
<b style="flex: 1;">
|
||||
<a style="width:100%" href="/channel/<%= item.ucid %>"><%= item.author %></a>
|
||||
<% if item.author_verified %>
|
||||
<a class="channel_badge"><i class="icon ion-md-checkmark-circle"></i></a>
|
||||
<% end %>
|
||||
</b>
|
||||
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch?v=<%= item.id %>" style="margin-right: 5px;">
|
||||
<i class="icon ion-logo-youtube"></i>
|
||||
|
Loading…
Reference in New Issue
Block a user