mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-24 17:19:51 +05:30
Fix playlist_thumbnail extractor
This commit is contained in:
parent
e6b4e12689
commit
2b94975345
@ -1,6 +1,8 @@
|
||||
html,
|
||||
body {
|
||||
font-family: BlinkMacSystemFont,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica,
|
||||
Arial, sans-serif;
|
||||
}
|
||||
|
||||
.deleted {
|
||||
@ -108,6 +110,7 @@ img.thumbnail {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.length {
|
||||
@ -452,6 +455,6 @@ video.video-js {
|
||||
*/
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -.81666em;
|
||||
margin-top: -0.81666em;
|
||||
margin-left: -1.5em;
|
||||
}
|
||||
|
@ -3003,7 +3003,7 @@ get "/user/:user/about" do |env|
|
||||
env.redirect "/channel/#{user}"
|
||||
end
|
||||
|
||||
get "/channel:ucid/about" do |env|
|
||||
get "/channel/:ucid/about" do |env|
|
||||
ucid = env.params.url["ucid"]
|
||||
env.redirect "/channel/#{ucid}"
|
||||
end
|
||||
@ -3107,8 +3107,7 @@ get "/channel/:ucid/playlists" do |env|
|
||||
end
|
||||
|
||||
items, continuation = fetch_channel_playlists(channel.ucid, channel.author, channel.auto_generated, continuation, sort_by)
|
||||
items.select! { |item| item.is_a?(SearchPlaylist) && !item.videos.empty? }
|
||||
items = items.map { |item| item.as(SearchPlaylist) }
|
||||
items = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) }
|
||||
items.each { |item| item.author = "" }
|
||||
|
||||
env.set "search", "channel:#{channel.ucid} "
|
||||
|
@ -397,8 +397,8 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
|
||||
)
|
||||
end
|
||||
|
||||
playlist_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
||||
playlist_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
||||
playlist_thumbnail = node.xpath_node(%q(.//span/img)).try &.["data-thumb"]?
|
||||
playlist_thumbnail ||= node.xpath_node(%q(.//span/img)).try &.["src"]
|
||||
|
||||
items << SearchPlaylist.new(
|
||||
title,
|
||||
|
Loading…
Reference in New Issue
Block a user