Invidious is an alternative front-end to YouTube
Fix RSS content-type
Omar Roth801dffd571ea
diff --git a/src/invidious.cr b/src/invidious.crindex 97de3fd0..63c44177 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -2439,7 +2439,7 @@ endget "/feed/channel/:ucid" do |env|locale = LOCALES[env.get("preferences").as(Preferences).locale]?- env.response.content_type = "text/xml; charset=UTF-8"+ env.response.content_type = "application/atom+xml"ucid = env.params.url["ucid"]@@ -2513,7 +2513,7 @@ endget "/feed/private" do |env|locale = LOCALES[env.get("preferences").as(Preferences).locale]?- env.response.content_type = "text/xml; charset=UTF-8"+ env.response.content_type = "application/atom+xml"token = env.params.query["token"]?@@ -2557,7 +2557,7 @@ endget "/feed/playlist/:plid" do |env|locale = LOCALES[env.get("preferences").as(Preferences).locale]?- env.response.content_type = "text/xml; charset=UTF-8"+ env.response.content_type = "application/atom+xml"plid = env.params.url["plid"]diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.crindex 3ed067ad..bad2e3a3 100644--- a/src/invidious/helpers/utils.cr+++ b/src/invidious/helpers/utils.cr@@ -332,7 +332,7 @@ def subscribe_pubsub(topic, key, config)case topicwhen .match(/^UC[A-Za-z0-9_-]{22}$/)topic = "channel_id=#{topic}"- when .match(/^(?:PL|LL|EC|UU|FL|UL|OLAK5uy_)[0-9A-Za-z-_]{10,}$/)+ when .match(/^(PL|LL|EC|UU|FL|UL|OLAK5uy_)[0-9A-Za-z-_]{10,}$/)# There's a couple missing from the above regex, namely TL and RD, which# don't have feedstopic = "playlist_id=#{topic}"