summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>2023-11-29 21:59:19 -0500
committerChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>2024-11-17 13:14:39 -0500
commit6dd89bd4016286bcd140415b3812673db1179648 (patch)
tree8538d2152b85b68c738a8c80c5909d91ceb2cf75 /src
parent98926047586154269bb269d01e3e52e60e044035 (diff)
downloadinvidious-6dd89bd4016286bcd140415b3812673db1179648.tar.gz
invidious-6dd89bd4016286bcd140415b3812673db1179648.tar.bz2
invidious-6dd89bd4016286bcd140415b3812673db1179648.zip
RSS: return 404 if youtube playlist doesnt exist
Diffstat (limited to 'src')
-rw-r--r--src/invidious/routes/feeds.cr3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr
index ea7fb396..989c7121 100644
--- a/src/invidious/routes/feeds.cr
+++ b/src/invidious/routes/feeds.cr
@@ -309,8 +309,9 @@ module Invidious::Routes::Feeds
end
response = YT_POOL.client &.get("/feeds/videos.xml?playlist_id=#{plid}")
- document = XML.parse(response.body)
+ return error_atom(404, NotFoundException.new("Playlist does not exist.")) if response.status_code == 404
+ document = XML.parse(response.body)
document.xpath_nodes(%q(//*[@href]|//*[@url])).each do |node|
node.attributes.each do |attribute|
case attribute.name