mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 11:28:51 +00:00
Add support for author thumbnails in search api for videos
This commit is contained in:
@@ -67,6 +67,8 @@ private module Parsers
|
||||
author_id = author_fallback.id
|
||||
end
|
||||
|
||||
author_thumbnail = item_contents.dig?("channelThumbnailSupportedRenderers", "channelThumbnailWithLinkRenderer", "thumbnail", "thumbnails", 0, "url").try &.as_s
|
||||
|
||||
author_verified = has_verified_badge?(item_contents["ownerBadges"]?)
|
||||
|
||||
# For live videos (and possibly recently premiered videos) there is no published information.
|
||||
@@ -148,6 +150,7 @@ private module Parsers
|
||||
length_seconds: length_seconds,
|
||||
premiere_timestamp: premiere_timestamp,
|
||||
author_verified: author_verified,
|
||||
author_thumbnail: author_thumbnail,
|
||||
badges: badges,
|
||||
})
|
||||
end
|
||||
@@ -579,6 +582,7 @@ private module Parsers
|
||||
length_seconds: duration,
|
||||
premiere_timestamp: Time.unix(0),
|
||||
author_verified: false,
|
||||
author_thumbnail: nil,
|
||||
badges: VideoBadges::None,
|
||||
})
|
||||
end
|
||||
@@ -708,6 +712,7 @@ private module Parsers
|
||||
length_seconds: duration,
|
||||
premiere_timestamp: Time.unix(0),
|
||||
author_verified: false,
|
||||
author_thumbnail: nil,
|
||||
badges: VideoBadges::None,
|
||||
})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user