summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-03-31 16:33:01 -0500
committerOmar Roth <omarroth@hotmail.com>2018-03-31 16:33:01 -0500
commit823f679cef1d9d0547cc0da1e9cd5a191a65a43b (patch)
tree36462abdae4b7bf6995ba6fd15dfe5d1db6ddb42 /src
parentcf9a8b0037bc3986c8985d5608ab0bbcef2f3c86 (diff)
downloadinvidious-823f679cef1d9d0547cc0da1e9cd5a191a65a43b.tar.gz
invidious-823f679cef1d9d0547cc0da1e9cd5a191a65a43b.tar.bz2
invidious-823f679cef1d9d0547cc0da1e9cd5a191a65a43b.zip
Add fix for removed videos in subbox
Diffstat (limited to 'src')
-rw-r--r--src/helpers.cr2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers.cr b/src/helpers.cr
index 6131989b..9bfa8b19 100644
--- a/src/helpers.cr
+++ b/src/helpers.cr
@@ -532,6 +532,8 @@ def fetch_channel(id, client, db)
rss = client.get("/feeds/videos.xml?channel_id=#{id}").body
rss = XML.parse_html(rss)
+ db.exec("DELETE FROM channel_videos * WHERE ucid = $1", id)
+
rss.xpath_nodes("//feed/entry").each do |entry|
video_id = entry.xpath_node("videoid").not_nil!.content
title = entry.xpath_node("title").not_nil!.content