mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Support adding video to playlist from watch page
This commit is contained in:
parent
2e378da922
commit
3f97bebd69
7 changed files with 57 additions and 9 deletions
|
@ -3131,9 +3131,7 @@ get "/feed/channel/:ucid" do |env|
|
|||
rss = YT_POOL.client &.get("/feeds/videos.xml?channel_id=#{channel.ucid}").body
|
||||
rss = XML.parse_html(rss)
|
||||
|
||||
videos = [] of SearchVideo
|
||||
|
||||
rss.xpath_nodes("//feed/entry").each do |entry|
|
||||
videos = rss.xpath_nodes("//feed/entry").map do |entry|
|
||||
video_id = entry.xpath_node("videoid").not_nil!.content
|
||||
title = entry.xpath_node("title").not_nil!.content
|
||||
|
||||
|
@ -3145,7 +3143,7 @@ get "/feed/channel/:ucid" do |env|
|
|||
description_html = entry.xpath_node("group/description").not_nil!.to_s
|
||||
views = entry.xpath_node("group/community/statistics").not_nil!.["views"].to_i64
|
||||
|
||||
videos << SearchVideo.new(
|
||||
SearchVideo.new(
|
||||
title: title,
|
||||
id: video_id,
|
||||
author: author,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue