kopia lustrzana https://github.com/iv-org/invidious
Clean up fetch_channel
rodzic
7757eca92c
commit
0e30ddb728
|
@ -540,12 +540,12 @@ def fetch_channel(id, client, db)
|
||||||
|
|
||||||
video = ChannelVideo.new(video_id, title, published, updated, ucid, author)
|
video = ChannelVideo.new(video_id, title, published, updated, ucid, author)
|
||||||
|
|
||||||
video_array = video.to_a[1..-1]
|
video_array = video.to_a
|
||||||
args = arg_array(video_array)
|
args = arg_array(video_array)
|
||||||
|
|
||||||
# TODO: Update record on conflict
|
# TODO: Update record on conflict
|
||||||
db.exec("INSERT INTO channel_videos VALUES (#{arg_array(video.to_a)})\
|
db.exec("INSERT INTO channel_videos VALUES (#{args})\
|
||||||
ON CONFLICT (id) DO NOTHING", video.to_a)
|
ON CONFLICT (id) DO NOTHING", video_array)
|
||||||
end
|
end
|
||||||
|
|
||||||
author = rss.xpath_node("//feed/author/name").not_nil!.content
|
author = rss.xpath_node("//feed/author/name").not_nil!.content
|
||||||
|
|
Ładowanie…
Reference in New Issue