mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Rename id to ucid for clarity
This commit is contained in:
parent
581056ae39
commit
ce714a0854
1 changed files with 4 additions and 4 deletions
|
@ -561,11 +561,11 @@ def get_channel(id, client, db)
|
||||||
return channel
|
return channel
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_channel(id, client, db)
|
def fetch_channel(ucid, client, db)
|
||||||
rss = client.get("/feeds/videos.xml?channel_id=#{id}").body
|
rss = client.get("/feeds/videos.xml?channel_id=#{ucid}").body
|
||||||
rss = XML.parse_html(rss)
|
rss = XML.parse_html(rss)
|
||||||
|
|
||||||
db.exec("DELETE FROM channel_videos * WHERE ucid = $1", id)
|
db.exec("DELETE FROM channel_videos * WHERE ucid = $1", ucid)
|
||||||
|
|
||||||
rss.xpath_nodes("//feed/entry").each do |entry|
|
rss.xpath_nodes("//feed/entry").each do |entry|
|
||||||
video_id = entry.xpath_node("videoid").not_nil!.content
|
video_id = entry.xpath_node("videoid").not_nil!.content
|
||||||
|
@ -591,7 +591,7 @@ def fetch_channel(id, client, db)
|
||||||
author = rss.xpath_node("//feed/author/name").try &.content
|
author = rss.xpath_node("//feed/author/name").try &.content
|
||||||
author ||= ""
|
author ||= ""
|
||||||
|
|
||||||
channel = InvidiousChannel.new(id, author, Time.now)
|
channel = InvidiousChannel.new(ucid, author, Time.now)
|
||||||
|
|
||||||
return channel
|
return channel
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue